From b4a2970c5baa334e8b066b3b6a372afc450611b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 9 Jan 2020 14:57:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index ae618a5f7..41c48fc3e 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -684,7 +684,6 @@ func buildErrMsgJson(task tasksch.ITask) (resultL []*SyncErrResult) { } if vv.StoreSkuInfo != nil { result.SkuID = vv.StoreSkuInfo.SkuID - result.CategoryName = "" result.VendorSkuID = vv.StoreSkuInfo.VendorSkuID result.NameID = vv.StoreSkuInfo.NameID result.VendorPrice = vv.StoreSkuInfo.VendorPrice @@ -832,25 +831,9 @@ func WirteToExcelBySyncFailed(task tasksch.ITask) (downloadURL, fileName string, sheetList1 []*excel.Obj2ExcelSheetConfig ) syncErrResultLock.syncErrResult = syncErrResultLock.syncErrResult[0:0] - failedList := task.GetErrMsg() - if len(failedList) == 0 { - return - } - for _, v := range failedList { - for _, vv := range v.([]*partner.StoreSkuInfoWithErr) { - result := SyncErrResult{ - SkuID: vv.StoreSkuInfo.SkuID, - CategoryName: vv.CategoryName, - StoreID: vv.StoreID, - VendorID: vv.VendoreID, - VendorSkuID: vv.StoreSkuInfo.VendorSkuID, - NameID: vv.StoreSkuInfo.NameID, - VendorPrice: vv.StoreSkuInfo.VendorPrice, - SyncType: vv.SyncType, - ErrMsg: vv.ErrMsg, - } - syncErrResultLock.AppendData(result) - } + list := buildErrMsgJson(task) + for _, v := range list { + syncErrResultLock.AppendData(*v) } excelConf1 := &excel.Obj2ExcelSheetConfig{ Title: "同步错误",