- 使用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 {

View File

@@ -178,7 +178,7 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
city.name city_name,
district.name district_name,
CONCAT('[', GROUP_CONCAT(DISTINCT CONCAT('{"vendorStoreID":"', m1.vendor_store_id, '", "vendorID":', m1.vendor_id,
', "status":', m1.status, ', "pricePercentage":', m1.price_percentage, ', "vendorStoreName":"',
', "status":', m1.status, ', "pricePercentage":', m1.price_percentage, ', "pricePercentagePack":"', m1.price_percentage_pack, '", "vendorStoreName":"',
CASE m1.vendor_id
WHEN 0 THEN IF(jd.name IS NULL, '', jd.name)
WHEN 3 THEN IF(eb.col_name IS NULL, '', eb.col_name)