From 7201caec7c46e1991f71b7bfcce252f696275d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 12 Aug 2020 08:51:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E8=A5=BF=E6=8A=98=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/act/act.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 6fbe1e4d1..1e2253b9b 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -1532,7 +1532,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { storeSku = storeSkus[0] shouldStockOut = utils.Float64TwoInt64(math.Ceil(float64(storeSku.Stock) / float64(60))) //每个时间点应出货 = 总库存/60 = N actualStockOut int64 //每个时间点实际出货 = C - pricePercentage = 0.02 //每次涨跌值为 原价的 2%,即原价100,每个时间点降价为2,涨价也为2 + pricePercentage float64 //每次涨跌值为 原价的 2%,即原价100,每个时间点降价为2,涨价也为2 actualPricePercentage float64 minJxPrice int64 ) @@ -1551,6 +1551,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { }() //第一档时间内 if (time.Now().Hour() >= 10 && time.Now().Hour() < 20) || (time.Now().Hour() == 20 && time.Now().Minute() < 1) { + pricePercentage = 0.02 if actStoreSku.TrendType == model.TrendTypeUp { actualPricePercentage = float64(actStoreSku.OriginalPrice) * (float64(1) + pricePercentage) } else if actStoreSku.TrendType == model.TrendTypeDown { @@ -1585,7 +1586,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { dao.Rollback(db) } } else { //第二档时间内 - + pricePercentage = 0.1 } dao.Commit(db) }