反算京西价测试

This commit is contained in:
苏尹岚
2020-03-19 10:00:30 +08:00
parent b402031860
commit cc5eb1f8aa
2 changed files with 3 additions and 1 deletions

View File

@@ -3651,10 +3651,11 @@ func RefreshJxPriceByVendor(ctx *jxcontext.Context, jdStoreSkus []*JdStoreSkus,
} }
fmt.Println("RefreshJxPriceByVendor1", vendorPrice) fmt.Println("RefreshJxPriceByVendor1", vendorPrice)
jxPrice := jxutils.CaculateJxPriceByPricePack(pricePercentagePack, 0, vendorPrice) jxPrice := jxutils.CaculateJxPriceByPricePack(pricePercentagePack, 0, vendorPrice)
fmt.Println("RefreshJxPriceByVendor2", jxPrice)
if skus[0].Unit == model.SpecialUnit { if skus[0].Unit == model.SpecialUnit {
jxPrice = jxPrice * int(utils.Float64TwoInt64(utils.Int2Float64(model.SpecialSpecQuality)/specQuality)) jxPrice = jxPrice * int(utils.Float64TwoInt64(utils.Int2Float64(model.SpecialSpecQuality)/specQuality))
} }
fmt.Println("RefreshJxPriceByVendor2", jxPrice) fmt.Println("RefreshJxPriceByVendor3", jxPrice)
jdMap[store.ID] = append(jdMap[store.ID], &JdStoreSkus{ jdMap[store.ID] = append(jdMap[store.ID], &JdStoreSkus{
JdSkuID: skus[0].NameID, JdSkuID: skus[0].NameID,
Price: jxPrice, Price: jxPrice,

View File

@@ -342,6 +342,7 @@ func CaculatePriceByPricePack(l model.PricePercentagePack, defPricePercentage, p
func CaculateJxPriceByPricePack(l model.PricePercentagePack, defPricePercentage, vendorPrice int) (jxPrice int) { func CaculateJxPriceByPricePack(l model.PricePercentagePack, defPricePercentage, vendorPrice int) (jxPrice int) {
pricePercentage, priceAdd := GetPricePercentageByVendorPrice(l, vendorPrice, defPricePercentage) pricePercentage, priceAdd := GetPricePercentageByVendorPrice(l, vendorPrice, defPricePercentage)
fmt.Println("RefreshJxPriceByVendor4", pricePercentage, priceAdd)
jxPrice = CaculateSkuPriceFromVendor(vendorPrice, pricePercentage, priceAdd) jxPrice = CaculateSkuPriceFromVendor(vendorPrice, pricePercentage, priceAdd)
return jxPrice return jxPrice
} }