同步错误返回
This commit is contained in:
@@ -472,9 +472,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
_, err = putils.FreeBatchStoreSkuSyncInfo("创建门店商品", func(task tasksch.ITask, batchedStoreSkuList []*dao.StoreSkuSyncInfo) (result interface{}, successCount int, err error) {
|
||||
var failedList []*partner.StoreSkuInfoWithErr
|
||||
failedList, err = singleStoreHandler.CreateStoreSkus(ctx, storeID, vendorStoreID, batchedStoreSkuList)
|
||||
if len(failedList) > 0 {
|
||||
task.AddErrMsg(failedList)
|
||||
}
|
||||
singleStoreHandler.IsErrSkuExist(err)
|
||||
if skuNameList, err2 := singleStoreHandler.GetStoreSkusFullInfo(ctx, task, storeID, vendorStoreID, []*partner.StoreSkuInfo{
|
||||
&partner.StoreSkuInfo{
|
||||
@@ -487,6 +484,11 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
// 如果创建商品时已经存在,需要更新
|
||||
updateList = append(updateList, calVendorPrice4StoreSku(batchedStoreSkuList[0], storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)))
|
||||
err = nil
|
||||
} else {
|
||||
failedList = append(failedList, putils.GetErrMsg2FailedSyncSingleList(batchedStoreSkuList, err2))
|
||||
}
|
||||
if len(failedList) > 0 {
|
||||
task.AddErrMsg(failedList)
|
||||
}
|
||||
if err != nil {
|
||||
//handle error for sensitive words, if find, then insert to table sensitive_words
|
||||
|
||||
Reference in New Issue
Block a user