Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
draw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
draw
draw
Commits
518a231f
Commit
518a231f
authored
Aug 03, 2022
by
邓吉芬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
十足喜力啤酒系列抽奖修改
parent
89615338
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
DrawManagerImpl.java
src/main/java/com/miya/draw/manager/DrawManagerImpl.java
+1
-2
application-prod.yml
src/main/resources/application-prod.yml
+5
-2
bussiness-config.yml
src/main/resources/bussiness-config.yml
+2
-2
No files found.
src/main/java/com/miya/draw/manager/DrawManagerImpl.java
View file @
518a231f
...
...
@@ -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
)
...
...
src/main/resources/application-prod.yml
View file @
518a231f
...
...
@@ -11,7 +11,7 @@ spring:
strict
:
true
datasource
:
db1
:
url
:
jdbc:mysql://rm-bp15h28bq72fbw407.mysql.rds.aliyuncs.com:3306/draw
nongf
u?characterEncoding=UTF-8&useSSL=true&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
url
:
jdbc:mysql://rm-bp15h28bq72fbw407.mysql.rds.aliyuncs.com:3306/draw
xilipiji
u?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
src/main/resources/bussiness-config.yml
View file @
518a231f
######################## 业务配置 ####################
draw
:
maxcount
:
10
#抽奖最大次数
countunit
:
10
#每多少元加1次次数
maxmoney
:
10
0
#理论上最多花费金额 元
countunit
:
7
#每多少元加1次次数
maxmoney
:
7
0
#理论上最多花费金额 元
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment