同步错误

This commit is contained in:
苏尹岚
2020-01-08 15:35:53 +08:00
parent 74e52a0d94
commit 2b3d7ce83a

View File

@@ -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))