Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
2dd553e9
Commit
2dd553e9
authored
Dec 12, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'luck_draw_feature' into dev
parents
d135e977
2379cd6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
ActivityPopularizeBiz.java
...com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
+8
-3
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
View file @
2dd553e9
...
...
@@ -99,19 +99,19 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
//新增第几个邀请人和邀请金额字段
Integer
num
=
relationBiz
.
getByUserIdAndPopularizeId
(
activityPopularizeRelation
);
Integer
amount
=
0
;
double
amount
=
0
;
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
activityPopularizeItem
.
getDetail
());
if
(
jsonObject
!=
null
&&
StringUtils
.
isNotBlank
(
jsonObject
.
getString
(
"detail"
)))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
jsonObject
.
getString
(
"detail"
));
if
(
jsonArray
!=
null
)
{
JSONObject
jsonObject1
=
jsonArray
.
getJSONObject
(
num
-
1
);
if
(
jsonObject1
!=
null
)
{
Integer
amountString
=
jsonObject1
.
getInteger
(
"amount"
);
double
amountString
=
jsonObject1
.
getInteger
(
"amount"
);
amount
=
amount
+
amountString
;
}
}
}
Integer
a
=
amount
;
double
a
=
amount
;
//添加活动关系
relationBiz
.
insertSelective
(
new
ActivityPopularizeRelation
()
{{
setPopularizeId
(
activityPopularize
.
getId
());
...
...
@@ -146,6 +146,11 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
currentProgress
+=
Double
.
parseDouble
(
a
+
""
);
BigDecimal
bigDecimal
=
new
BigDecimal
(
currentProgress
);
log
.
info
(
"用户现活动进度:newCurrentProgress = {}"
,
currentProgress
);
if
(
activityPopularizeUser
.
getEndProgress
().
compareTo
(
bigDecimal
)
!=
0
)
{
activityPopularizeUser
.
setStatus
(
0
);
}
else
{
activityPopularizeUser
.
setStatus
(
1
);
}
//修改当前进度
activityPopularizeUser
.
setCurrentProgress
(
bigDecimal
);
popularizeUserBiz
.
updateSelectiveById
(
activityPopularizeUser
);
...
...
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