1
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user