- GetPricePercentage要求的是unitPrice
This commit is contained in:
@@ -2028,7 +2028,7 @@ func RefreshStoresSkuByVendor(ctx *jxcontext.Context, storeIDs []int, vendorID i
|
||||
}
|
||||
}
|
||||
for _, v := range storeSkuList {
|
||||
pricePercentage := jxutils.GetPricePercentageByVendorPrice(storeMap[v.StoreID].PricePercentagePackObj, v.Price, int(storeMap[v.StoreID].PricePercentage))
|
||||
pricePercentage := jxutils.GetPricePercentageByVendorPrice(storeMap[v.StoreID].PricePercentagePackObj, v.UnitPrice, int(storeMap[v.StoreID].PricePercentage))
|
||||
skuName := skuNameMap[skuMap[v.SkuID].NameID]
|
||||
v.Price = jxutils.CaculateSkuPriceFromVendor(v.Price, pricePercentage, 0)
|
||||
v.UnitPrice = jxutils.CaculateSkuPriceFromVendor(skuName.Price, pricePercentage, 0)
|
||||
|
||||
@@ -180,7 +180,7 @@ func storeSkuSyncInfo2Bare(inSku *dao.StoreSkuSyncInfo) (outSku *partner.StoreSk
|
||||
}
|
||||
|
||||
func calVendorPrice4StoreSku(inSku *dao.StoreSkuSyncInfo, pricePercentagePack model.PricePercentagePack, pricePercentage int) (outSku *dao.StoreSkuSyncInfo) {
|
||||
pricePercentage = jxutils.GetPricePercentage(pricePercentagePack, int(inSku.Price), pricePercentage)
|
||||
pricePercentage = jxutils.GetPricePercentage(pricePercentagePack, int(inSku.UnitPrice), pricePercentage)
|
||||
inSku.VendorPrice = int64(jxutils.CaculateSkuVendorPrice(int(inSku.Price), pricePercentage, 0))
|
||||
return inSku
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user