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
459de788
Commit
459de788
authored
Aug 09, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
00c7168a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
UserBiz.java
...n/java/com/github/wxiaoqi/security/admin/biz/UserBiz.java
+2
-6
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+17
-4
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserBiz.java
View file @
459de788
...
...
@@ -110,11 +110,7 @@ public class UserBiz extends BaseBiz<UserMapper,User> {
return
mapper
.
select
(
user
);
}
public
User
getUserByUid
(
Integer
toUid
){
User
user
=
mapper
.
getUserByUid
(
toUid
);
if
(
user
!=
null
){
user
=
mapper
.
selectByPrimaryKey
(
user
.
getId
());
}
return
user
;
public
User
getUserByUid
(
Integer
userId
){
return
mapper
.
selectByPrimaryKey
(
userId
);
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
459de788
...
...
@@ -139,6 +139,8 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
}
Long
time
=
System
.
currentTimeMillis
();
List
<
UserCouponVo
>
list
=
mapper
.
getUserCouponsByType
(
userId
,
type
,
time
,
channel
);
List
<
UserCouponVo
>
list1
=
new
ArrayList
<>();
List
<
UserCouponVo
>
list2
=
new
ArrayList
<>();
if
(
list
.
size
()>
0
){
for
(
UserCouponVo
couponVo:
list
){
Integer
status
=
2
;
...
...
@@ -147,16 +149,27 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
amout
.
compareTo
(
couponVo
.
getWithAmount
())>=
0
){
status
=
1
;
}
couponVo
.
setStatus
(
status
);
list1
.
add
(
couponVo
);
}
else
if
(
couponVo
.
getType
()==
3
){
status
=
1
;
couponVo
.
setStatus
(
status
);
list2
.
add
(
couponVo
);
}
}
couponVo
.
setStatus
(
status
);
}
list
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
//
list.sort(Comparator.comparing(UserCouponVo::getStatus));
}
return
ObjectRestResponse
.
succ
(
list
);
if
(
list1
.
size
()>
0
){
list1
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
if
(
list2
.
size
()>
0
){
list2
.
sort
(
Comparator
.
comparing
(
UserCouponVo:
:
getStatus
));
}
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"type1"
,
list1
);
object
.
put
(
"type2"
,
list2
);
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