diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index aee98a6c2..435f5e65a 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -662,18 +662,28 @@ func buildErrMsg(task tasksch.ITask) (err error) { failedList := task.GetErrMsg() for _, v := range failedList { for _, vv := range v.([]*partner.StoreSkuInfoWithErr) { - result := &SyncErrResult{ - SkuID: vv.StoreSkuInfo.SkuID, - StoreID: vv.StoreID, - CategoryName: vv.CategoryName, - VendorID: vv.VendoreID, - VendorSkuID: vv.StoreSkuInfo.VendorSkuID, - NameID: vv.StoreSkuInfo.NameID, - VendorPrice: vv.StoreSkuInfo.VendorPrice, - SyncType: vv.SyncType, - ErrMsg: vv.ErrMsg, + if vv.StoreSkuInfo != nil { + result := &SyncErrResult{ + SkuID: vv.StoreSkuInfo.SkuID, + StoreID: vv.StoreID, + VendorID: vv.VendoreID, + VendorSkuID: vv.StoreSkuInfo.VendorSkuID, + NameID: vv.StoreSkuInfo.NameID, + VendorPrice: vv.StoreSkuInfo.VendorPrice, + SyncType: vv.SyncType, + ErrMsg: vv.ErrMsg, + } + resultL = append(resultL, result) + } else { + result := &SyncErrResult{ + StoreID: vv.StoreID, + CategoryName: vv.CategoryName, + VendorID: vv.VendoreID, + SyncType: vv.SyncType, + ErrMsg: vv.ErrMsg, + } + resultL = append(resultL, result) } - resultL = append(resultL, result) } } err = fmt.Errorf(utils.Format4Output(resultL, true))