This commit is contained in:
邹宗楠
2023-04-23 16:53:51 +08:00
parent de3c3c63a5
commit d46df6fb09
2 changed files with 2 additions and 1 deletions

View File

@@ -116,7 +116,6 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
if err = getAPI(storeSkuList[0].VendorOrgCode, storeID, vendorStoreID).DeleteStoreCommodity(utils.Str2Int64(v.VendorSkuID)); err != nil {
failedList = append(failedList, putils.GetErrMsg2FailedSingleList(v, err, storeID, model.VendorChineseNames[model.VendorIDDD], "删除子商品")...)
}
dao.DeleteThingToTiktokMapList(model.VendorIDDD, v.VendorMainId, storeSkuList[0].SkuID)
}
}
if len(failedList) > 0 {

View File

@@ -226,6 +226,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
} else if localThing[0].SyncStatus == model.ThingTypeSyncSuccess {
// 主商品存在,直接同步子商品
childrenProductId, err := api.CreateSubProduct(utils.Str2Int64(localThing[0].VendorThingID), utils.Str2Int64(vendorStoreID))
globals.SugarLogger.Debugf("==========:%s", localThing[0].VendorThingID)
globals.SugarLogger.Debugf("==========:%v", err)
if err != nil && strings.Contains(err.Error(), "2010004") { // 2010004:主商品非在线审核通过状态,不允许绑定子商品
// 线上本地都存在,但是线上审核不成功,就去更新主商品
mainOrderDetail = loadMainProductId(api, storeSku, localThing[0].VendorThingID)