- 新同步逻辑调整,京东还有问题

This commit is contained in:
gazebo
2019-07-18 09:11:31 +08:00
parent b5b3d82130
commit 2c2659b0ed
10 changed files with 98 additions and 59 deletions

View File

@@ -57,7 +57,7 @@ func (p *PurchaseHandler) GetStoreSkusBareInfo(ctx *jxcontext.Context, parentTas
storeSkuMap[v.SkuID].Status = jdStoreSkuStatus2Jx(v.Vendibility)
}
for _, v := range priceInfo {
storeSkuMap[v.SkuID].Price = v.Price
storeSkuMap[v.SkuID].VendorPrice = v.Price
}
}
}
@@ -94,14 +94,14 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (err error) {
if len(storeSkuList) == 1 {
if globals.EnableJdStoreWrite {
_, err = api.JdAPI.UpdateStationPrice(utils.Str2Int64WithDefault(storeSkuList[0].VendorSkuID, 0), vendorStoreID, int(storeSkuList[0].Price))
_, err = api.JdAPI.UpdateStationPrice(utils.Str2Int64WithDefault(storeSkuList[0].VendorSkuID, 0), vendorStoreID, int(storeSkuList[0].VendorPrice))
}
} else {
var skuPriceInfoList []*jdapi.SkuPriceInfo
for _, v := range storeSkuList {
skuPriceInfoList = append(skuPriceInfoList, &jdapi.SkuPriceInfo{
OutSkuId: utils.Int2Str(v.SkuID),
Price: int(v.Price),
Price: int(v.VendorPrice),
})
}
if globals.EnableJdStoreWrite {