Commit 518a231f authored by 邓吉芬's avatar 邓吉芬

十足喜力啤酒系列抽奖修改

parent 89615338
......@@ -91,7 +91,6 @@ public class DrawManagerImpl implements IDrawManager {
BigDecimal buyTotal = gainBuyTotal(buyGoodList);
Long purchasedAmount = buyTotal.multiply(BigDecimal.valueOf(100)).longValue();
Integer drawCountTotal = buyTotal.divide(new BigDecimal(businessConfig.getDrawCountUnit()), RoundingMode.DOWN).intValue();
drawCountTotal = Math.max(drawCountTotal - alreadyDrawCount, 0);
drawCountTotal = Math.min(businessConfig.getDrawMaxCount(), drawCountTotal);
Integer joinActivityPeopleNum = accountPrizeService.countJoinActivityPeople();
drawCountTotal = drawCountTotal - alreadyDrawCount;
......@@ -99,7 +98,7 @@ public class DrawManagerImpl implements IDrawManager {
.alreadyDrawCount(alreadyDrawCount)
.drawCountTotal(drawCountTotal>=0?drawCountTotal:0)
.maxDrawCountLimit(maxDrawCountLimit)
.numOfDrawCount(Math.max(0, maxDrawCountLimit - drawCountTotal))
.numOfDrawCount(Math.max(0, maxDrawCountLimit - alreadyDrawCount))
.purchasedAmount(purchasedAmount)
.taxAmountCache(Math.max(0L, BigDecimal.valueOf(businessConfig.getDrawMaxMoney()).subtract(buyTotal).multiply(BigDecimal.valueOf(100)).longValue()))
.numOfJoinActivityPeople(joinActivityPeopleNum)
......
......@@ -11,7 +11,7 @@ spring:
strict: true
datasource:
db1:
url: jdbc:mysql://rm-bp15h28bq72fbw407.mysql.rds.aliyuncs.com:3306/drawnongfu?characterEncoding=UTF-8&useSSL=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
url: jdbc:mysql://rm-bp15h28bq72fbw407.mysql.rds.aliyuncs.com:3306/drawxilipijiu?characterEncoding=UTF-8&useSSL=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
username: draw
password: sACSFEgGEYcWXNDeyr74
driver-class-name: com.mysql.jdbc.Driver
......@@ -81,4 +81,7 @@ eureka:
serviceUrl:
defaultZone: http://172.16.115.216:8761/eureka/,http://172.16.115.217:8761/eureka/
#【默认为30秒】eureka客户端间隔多久去拉取服务注册信息
registry-fetch-interval-seconds: 3
\ No newline at end of file
registry-fetch-interval-seconds: 3
######################## 业务配置 ####################
draw:
maxcount: 10 #抽奖最大次数
countunit: 10 #每多少元加1次次数
maxmoney: 100 #理论上最多花费金额 元
countunit: 7 #每多少元加1次次数
maxmoney: 70 #理论上最多花费金额 元
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment