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))
|
globals.SugarLogger.Debugf("看看走这儿了没,是不是更新 参数failedList1 %s", utils.Format4Output(failedList, false))
|
||||||
return failedList, err
|
return failedList, err
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("====SkuId:= %d,ProductId := %d ", tiktokSkuId, utils.Str2Int64(v.VendorMainId))
|
||||||
price := &sku_editPrice_request.SkuEditPriceParam{
|
price := &sku_editPrice_request.SkuEditPriceParam{
|
||||||
Price: v.VendorPrice,
|
Price: v.VendorPrice,
|
||||||
SkuId: tiktokSkuId,
|
SkuId: tiktokSkuId,
|
||||||
ProductId: utils.Str2Int64(v.VendorSkuID),
|
ProductId: utils.Str2Int64(v.VendorMainId),
|
||||||
}
|
}
|
||||||
//更新子品
|
//更新子品
|
||||||
if err = api.EditPrice(price); err != nil {
|
if err = api.EditPrice(price); err != nil {
|
||||||
|
|||||||
@@ -301,7 +301,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
updateParam.MainProductId = mainOrderDetail.MainProductId
|
updateParam.MainProductId = mainOrderDetail.MainProductId
|
||||||
updateParam.SpecPrices = param.SpecPrices
|
updateParam.SpecPrices = param.SpecPrices
|
||||||
//updateParam.StoreId = utils.Str2Int64(vendorStoreID)
|
//updateParam.StoreId = utils.Str2Int64(vendorStoreID)
|
||||||
globals.SugarLogger.Debugf("========updateParam=============1 %s", utils.Format4Output(updateParam, false))
|
|
||||||
if err := api.EditStoreCommodity(updateParam); err != nil {
|
if err := api.EditStoreCommodity(updateParam); err != nil {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||||
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
||||||
@@ -386,13 +385,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
// 获取品牌
|
// 获取品牌
|
||||||
param.StandardBrandId = 789194134 // 默认品牌京西菜市
|
param.StandardBrandId = 789194134 // 默认品牌京西菜市
|
||||||
var mainIdInt int64
|
var mainIdInt int64
|
||||||
globals.SugarLogger.Debugf("========param=============0 %s , mainId %d", utils.Format4Output(storeSku, false), mainIdInt)
|
|
||||||
if storeSku.VendorMainId == "" {
|
if storeSku.VendorMainId == "" {
|
||||||
localThing, _ := dao.GetThingToTiktokMapList(db, model.VendorIDDD, int64(storeSku.SkuID), storeDetail.VendorOrgCode)
|
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 {
|
if len(localThing) == 0 || localThing == nil {
|
||||||
mainOrderDetail, err := api.GetSkuDetailLocalID("", utils.Int2Str(storeSku.SkuID))
|
mainOrderDetail, err := api.GetSkuDetailLocalID("", utils.Int2Str(storeSku.SkuID))
|
||||||
globals.SugarLogger.Debugf("========mainOrderDetail=============1 %s", utils.Format4Output(mainOrderDetail, false))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||||
continue
|
continue
|
||||||
@@ -415,7 +411,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
param.MainProductId = mainIdInt
|
param.MainProductId = mainIdInt
|
||||||
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, param.MainProductId, storeSku)
|
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, param.MainProductId, storeSku)
|
||||||
//param.StoreId = utils.Str2Int64(vendorStoreID)
|
//param.StoreId = utils.Str2Int64(vendorStoreID)
|
||||||
globals.SugarLogger.Debugf("========param=============1 %s", utils.Format4Output(param, false))
|
|
||||||
if err := api.EditStoreCommodity(param); err != nil {
|
if err := api.EditStoreCommodity(param); err != nil {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||||
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
||||||
|
|||||||
Reference in New Issue
Block a user