This commit is contained in:
邹宗楠
2022-12-21 16:54:36 +08:00
parent 8ba030360d
commit f548726ae3
2 changed files with 2 additions and 6 deletions

View File

@@ -181,10 +181,11 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
globals.SugarLogger.Debugf("看看走这儿了没,是不是更新 参数failedList1 %s", utils.Format4Output(failedList, false))
return failedList, err
}
globals.SugarLogger.Debugf("====SkuId:= %d,ProductId := %d ", tiktokSkuId, utils.Str2Int64(v.VendorMainId))
price := &sku_editPrice_request.SkuEditPriceParam{
Price: v.VendorPrice,
SkuId: tiktokSkuId,
ProductId: utils.Str2Int64(v.VendorSkuID),
ProductId: utils.Str2Int64(v.VendorMainId),
}
//更新子品
if err = api.EditPrice(price); err != nil {

View File

@@ -301,7 +301,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
updateParam.MainProductId = mainOrderDetail.MainProductId
updateParam.SpecPrices = param.SpecPrices
//updateParam.StoreId = utils.Str2Int64(vendorStoreID)
globals.SugarLogger.Debugf("========updateParam=============1 %s", utils.Format4Output(updateParam, false))
if err := api.EditStoreCommodity(updateParam); err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
@@ -386,13 +385,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
// 获取品牌
param.StandardBrandId = 789194134 // 默认品牌京西菜市
var mainIdInt int64
globals.SugarLogger.Debugf("========param=============0 %s , mainId %d", utils.Format4Output(storeSku, false), mainIdInt)
if storeSku.VendorMainId == "" {
localThing, _ := dao.GetThingToTiktokMapList(db, model.VendorIDDD, int64(storeSku.SkuID), storeDetail.VendorOrgCode)
globals.SugarLogger.Debugf("========localThing=============1 %s", utils.Format4Output(localThing, false))
if len(localThing) == 0 || localThing == nil {
mainOrderDetail, err := api.GetSkuDetailLocalID("", utils.Int2Str(storeSku.SkuID))
globals.SugarLogger.Debugf("========mainOrderDetail=============1 %s", utils.Format4Output(mainOrderDetail, false))
if err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
continue
@@ -415,7 +411,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
param.MainProductId = mainIdInt
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, param.MainProductId, storeSku)
//param.StoreId = utils.Str2Int64(vendorStoreID)
globals.SugarLogger.Debugf("========param=============1 %s", utils.Format4Output(param, false))
if err := api.EditStoreCommodity(param); err != nil {
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)