From 4458a1e3928b3ba5cc8b592a66cdcf1943b745e9 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 7 Jun 2019 12:53:30 +0800 Subject: [PATCH] =?UTF-8?q?-=20sync.SyncStoresSkus=E4=B8=AD=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=88=A4=E6=96=ADtask=E6=98=AF=E5=90=A6=E4=B8=BAnil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index b572b1e5d..397a5d21c 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -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 }