1
This commit is contained in:
@@ -175,20 +175,14 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
|
||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||
api := getAPI(vendorOrgCode, storeID, vendorStoreID)
|
||||
for _, v := range storeSkuList {
|
||||
//// 更新子品价格
|
||||
//err = api.EditPrice(&sku_editPrice_request.SkuEditPriceParam{
|
||||
// Price: v.VendorPrice,
|
||||
// SkuId: utils.Str2Int64(v.VendorSkuAttrId),
|
||||
// ProductId: utils.Str2Int64(v.VendorSkuID),
|
||||
//})
|
||||
//if err != nil {
|
||||
// failedList = append(failedList, putils.GetErrMsg2FailedSingleList(v, err, storeID, model.VendorChineseNames[model.VendorIDDD], "同步子品价格异常")...)
|
||||
//}
|
||||
|
||||
tiktokSkuId, failedList := getProductSkuId4UpdateStock(api, v, storeID)
|
||||
if len(failedList) > 0 {
|
||||
return failedList, err
|
||||
}
|
||||
//更新子品
|
||||
err = api.EditPrice(&sku_editPrice_request.SkuEditPriceParam{
|
||||
Price: v.VendorPrice,
|
||||
SkuId: utils.Str2Int64(v.VendorSonSkuID),
|
||||
SkuId: tiktokSkuId,
|
||||
ProductId: utils.Str2Int64(v.VendorSkuID),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -448,6 +448,7 @@ func getProductSkuId4UpdateStock(api *tiktokShop.API, skuInfo *partner.StoreSkuI
|
||||
|
||||
for _, v := range childrenSku.SpecPrices {
|
||||
tiktokSkuId = v.SkuId
|
||||
skuInfo.VendorSonSkuID = utils.Int64ToStr(v.SkuId)
|
||||
return tiktokSkuId, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user