- 在jd.getStoreSkusBareInfoLimitSize设置Stock

This commit is contained in:
gazebo
2019-08-02 10:25:26 +08:00
parent a5f4f054b2
commit 92daec3d93
2 changed files with 20 additions and 12 deletions

View File

@@ -48,16 +48,16 @@ func (p *PurchaseHandler) getStoreSkusBareInfoLimitSize(ctx *jxcontext.Context,
tasksch.HandleTask(task, parentTask, false).Run()
_, err = task.GetResult(0)
if err == nil {
storeSkuMap := make(map[int64]*partner.StoreSkuInfo)
for _, v := range inStoreSkuList {
storeSkuMap[utils.Str2Int64(v.VendorSkuID)] = v
}
storeSkuMap := putils.StoreSkuList2MapByVendorSkuID(inStoreSkuList)
for _, v := range stockInfo {
outStoreSkuList = append(outStoreSkuList, storeSkuMap[v.SkuID])
storeSkuMap[v.SkuID].Status = jdStoreSkuStatus2Jx(v.Vendibility)
sku := storeSkuMap[utils.Int64ToStr(v.SkuID)]
sku.Status = jdStoreSkuStatus2Jx(v.Vendibility)
sku.Stock = v.UsableQty
outStoreSkuList = append(outStoreSkuList, sku)
}
for _, v := range priceInfo {
storeSkuMap[v.SkuID].VendorPrice = v.Price
sku := storeSkuMap[utils.Int64ToStr(v.SkuID)]
sku.VendorPrice = v.Price
}
}
}