- 使用GetPricePercentage

This commit is contained in:
gazebo
2019-07-15 18:26:25 +08:00
parent ff4b6098d7
commit 1650a2d7e8
8 changed files with 46 additions and 46 deletions

View File

@@ -110,6 +110,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
if storeSkuInfo := storeSkuMap[jxutils.Combine2Int(v.StoreID, v.SkuID)]; storeSkuInfo != nil {
validVendorMap[vendorID] = 1
validSkuMap[v.SkuID] = 1
pricePercentage := jxutils.GetPricePercentage(storeDetail.PricePercentagePackObj, storeSkuInfo.Price, int(storeDetail.PricePercentage))
actSkuMap := &model.ActStoreSkuMap{
ActID: act.ID,
StoreID: storeID,
@@ -117,7 +118,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
VendorID: vendorID,
SyncStatus: model.SyncFlagNewMask,
VendorPrice: int64(jxutils.CaculateSkuVendorPrice(storeSkuInfo.Price, jxutils.GetPricePercentage(storeDetail.PricePercentagePackObj, storeSkuInfo.Price, int(storeDetail.PricePercentage)), 0)),
VendorPrice: int64(jxutils.CaculateSkuVendorPrice(storeSkuInfo.Price, pricePercentage, 0)),
}
v.OriginalPrice = actSkuMap.VendorPrice
if v.ActPrice != 0 {