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
b752cd34
Commit
b752cd34
authored
Aug 09, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
fa6b7b9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+20
-11
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
b752cd34
package
com
.
xxfc
.
platform
.
activity
.
biz
;
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.dto.UserInfoDTO
;
import
com.github.wxiaoqi.security.admin.dto.UserInfoDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
...
@@ -162,30 +163,38 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -162,30 +163,38 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
}
}
BigDecimal
mAmount
=
BigDecimal
.
ZERO
;
BigDecimal
mAmount
=
BigDecimal
.
ZERO
;
if
(
list2
.
size
()>
0
){
if
(
list2
.
size
()>
0
){
if
(
mAmount
.
compareTo
(
BigDecimal
.
ZERO
)==
0
){
UserCouponVo
userCouponVo
=
list2
.
get
(
0
);
UserCouponVo
userCouponVo
=
list2
.
get
(
0
);
if
(
userCouponVo
!=
null
){
if
(
userCouponVo
!=
null
){
mAmount
=
userCouponVo
.
getUsedAmount
();
mAmount
=
userCouponVo
.
getUsedAmount
();
userCouponVo
.
setIsChecked
(
1
);
userCouponVo
.
setIsChecked
(
1
);
list2
.
set
(
0
,
userCouponVo
);
list2
.
set
(
0
,
userCouponVo
);
}
}
}
list2
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
list2
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
}
if
(
list1
.
size
()>
0
){
if
(
list1
.
size
()>
0
){
if
(
mAmount
.
compareTo
(
BigDecimal
.
ZERO
)==
0
){
UserCouponVo
userCouponVo
=
list1
.
get
(
0
);
UserCouponVo
userCouponVo
=
list1
.
get
(
0
);
if
(
userCouponVo
!=
null
){
if
(
userCouponVo
!=
null
){
mAmount
=
userCouponVo
.
getUsedAmount
();
mAmount
=
userCouponVo
.
getUsedAmount
();
userCouponVo
.
setIsChecked
(
1
);
userCouponVo
.
setIsChecked
(
1
);
list1
.
set
(
0
,
userCouponVo
);
list1
.
set
(
0
,
userCouponVo
);
}
}
}
list1
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
list1
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
}
JSONArray
array
=
new
JSONArray
();
JSONObject
object
=
new
JSONObject
();
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"1"
,
list1
);
object
.
put
(
"type"
,
1
);
object
.
put
(
"3"
,
list2
);
object
.
put
(
"list"
,
list1
);
object
.
put
(
"mAmount"
,
mAmount
);
array
.
add
(
object
);
return
ObjectRestResponse
.
succ
(
object
);
JSONObject
object1
=
new
JSONObject
();
object1
.
put
(
"type"
,
3
);
object1
.
put
(
"list"
,
list2
);
array
.
add
(
object1
);
JSONObject
result
=
new
JSONObject
();
result
.
put
(
"mAmount"
,
mAmount
);
result
.
put
(
"array"
,
array
);
return
ObjectRestResponse
.
succ
(
result
);
}
}
...
...
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