- 使用GetPricePercentage
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user