diff --git a/server/product/internal/logic/getfittingbypidlogic.go b/server/product/internal/logic/getfittingbypidlogic.go index 18f76892..53db5460 100644 --- a/server/product/internal/logic/getfittingbypidlogic.go +++ b/server/product/internal/logic/getfittingbypidlogic.go @@ -70,6 +70,9 @@ func (l *GetFittingByPidLogic) GetFittingByPid(req *types.GetFittingByPidReq, us } partIds := make([]int64, 0, len(modelList)) for _, v := range modelList { + if v.PartId == nil { + continue + } partIds = append(partIds, *v.PartId) } //获取配件数据