价格包参数添加priceAdd

This commit is contained in:
gazebo
2019-11-11 09:20:14 +08:00
parent 6a37def14f
commit 83f9493352
5 changed files with 18 additions and 17 deletions

View File

@@ -146,8 +146,6 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
storeSkuInfo := storeSkuMap[jxutils.Combine2Int(v.StoreID, v.SkuID)]
if storeSkuInfo != nil {
jxPrice := storeSkuInfo.Price
// pricePercentage := jxutils.GetPricePercentage(storeDetail.PricePercentagePackObj, jxPrice, int(storeDetail.PricePercentage))
// actSkuMap.VendorPrice = int64(jxutils.CaculateSkuVendorPrice(jxPrice, pricePercentage))
actSkuMap.VendorPrice = int64(getVendorPriceFromStoreSkuBind(storeSkuInfo, vendorID))
v.OriginalPrice = int64(jxPrice)
}
@@ -166,7 +164,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
if v.PricePercentage != 0 {
percentage = v.PricePercentage
}
actSkuMap.ActualActPrice = int64(jxutils.CaculateSkuVendorPrice(int(actSkuMap.VendorPrice), percentage))
actSkuMap.ActualActPrice = int64(jxutils.CaculateSkuVendorPrice(int(actSkuMap.VendorPrice), percentage, 0))
if actSkuMap.ActualActPrice > 10 {
actSkuMap.ActualActPrice = int64(math.Floor(float64(actSkuMap.ActualActPrice)/10) * 10)
}