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
fa6b7b9d
Commit
fa6b7b9d
authored
Aug 09, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
459de788
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
UserCouponVo.java
...main/java/com/xxfc/platform/activity/vo/UserCouponVo.java
+6
-0
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+21
-5
No files found.
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/UserCouponVo.java
View file @
fa6b7b9d
...
@@ -149,6 +149,12 @@ public class UserCouponVo {
...
@@ -149,6 +149,12 @@ public class UserCouponVo {
*/
*/
@ApiModelProperty
(
value
=
"跳转链接"
)
@ApiModelProperty
(
value
=
"跳转链接"
)
private
String
url
;
private
String
url
;
/**
* 是否选中
*/
@ApiModelProperty
(
value
=
"是否选中"
)
private
Integer
isChecked
;
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
fa6b7b9d
...
@@ -160,15 +160,31 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
...
@@ -160,15 +160,31 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
}
}
// list.sort(Comparator.comparing(UserCouponVo::getStatus));
// list.sort(Comparator.comparing(UserCouponVo::getStatus));
}
}
if
(
list1
.
size
()>
0
){
BigDecimal
mAmount
=
BigDecimal
.
ZERO
;
list1
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
if
(
list2
.
size
()>
0
){
if
(
list2
.
size
()>
0
){
if
(
mAmount
.
compareTo
(
BigDecimal
.
ZERO
)==
0
){
UserCouponVo
userCouponVo
=
list2
.
get
(
0
);
if
(
userCouponVo
!=
null
){
mAmount
=
userCouponVo
.
getUsedAmount
();
userCouponVo
.
setIsChecked
(
1
);
list2
.
set
(
0
,
userCouponVo
);
}
}
list2
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
list2
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
}
if
(
list1
.
size
()>
0
){
UserCouponVo
userCouponVo
=
list1
.
get
(
0
);
if
(
userCouponVo
!=
null
){
mAmount
=
userCouponVo
.
getUsedAmount
();
userCouponVo
.
setIsChecked
(
1
);
list1
.
set
(
0
,
userCouponVo
);
}
list1
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
JSONObject
object
=
new
JSONObject
();
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"type1"
,
list1
);
object
.
put
(
"1"
,
list1
);
object
.
put
(
"type2"
,
list2
);
object
.
put
(
"3"
,
list2
);
object
.
put
(
"mAmount"
,
mAmount
);
return
ObjectRestResponse
.
succ
(
object
);
return
ObjectRestResponse
.
succ
(
object
);
}
}
...
...
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