- sync.SyncStoresSkus中需要判断task是否为nil
This commit is contained in:
@@ -422,18 +422,20 @@ func (v *VendorSync) SyncStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, vendo
|
||||
}
|
||||
return nil, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
|
||||
}, isContinueWhenError)
|
||||
if vendorErr := partner.IsErrChangePriceFailed(task.GetOriginalErr()); vendorErr != nil {
|
||||
platformList := make([]string, len(task.GetDetailErrList()))
|
||||
for k, v := range task.GetDetailErrList() {
|
||||
if vendorErr := partner.IsErrVendorError(v); vendorErr != nil {
|
||||
platformList[k] = model.VendorChineseNames[vendorErr.VendorID()]
|
||||
} else {
|
||||
platformList[k] = "未知"
|
||||
if task != nil {
|
||||
if vendorErr := partner.IsErrChangePriceFailed(task.GetOriginalErr()); vendorErr != nil {
|
||||
platformList := make([]string, len(task.GetDetailErrList()))
|
||||
for k, v := range task.GetDetailErrList() {
|
||||
if vendorErr := partner.IsErrVendorError(v); vendorErr != nil {
|
||||
platformList[k] = model.VendorChineseNames[vendorErr.VendorID()]
|
||||
} else {
|
||||
platformList[k] = "未知"
|
||||
}
|
||||
}
|
||||
err = fmt.Errorf("同步价格失败\n失败平台:%s", strings.Join(platformList, ","))
|
||||
} else {
|
||||
err = makeSyncError(err)
|
||||
}
|
||||
err = fmt.Errorf("同步价格失败\n失败平台:%s", strings.Join(platformList, ","))
|
||||
} else {
|
||||
err = makeSyncError(err)
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user