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
91d53ff8
Commit
91d53ff8
authored
Jul 25, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团队成员
parent
a74cbc88
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+11
-4
DateController.java
.../java/com/xxfc/platform/activity/rest/DateController.java
+6
-1
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
91d53ff8
...
...
@@ -269,9 +269,9 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
CollectionUtils
.
isEmpty
(
data
))
{
return
userCouponPag
;
}
Map
<
Integer
,
AppUserLogin
>
userIdAndAppuserLoginMap
=
n
ull
;
if
(
Objects
.
nonNull
(
userCouponFindDTO
.
getPhone
()))
{
List
<
Integer
>
userIds
=
data
.
stream
().
map
(
UserCouponDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
AppUserLogin
>
userIdAndAppuserLoginMap
=
n
ew
HashMap
<>()
;
if
(
StringUtils
.
isEmpty
(
userCouponFindDTO
.
getPhone
()))
{
List
<
Integer
>
userIds
=
data
.
stream
().
map
(
UserCouponDTO:
:
getUserId
).
distinct
().
collect
(
Collectors
.
toList
());
userIdAndAppuserLoginMap
=
userFeign
.
findAppUsersByUserIds
(
userIds
);
}
List
<
UserCouponPageVo
>
userCouponPageVos
=
new
ArrayList
<>();
...
...
@@ -282,7 +282,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
Objects
.
nonNull
(
userCouponFindDTO
.
getPhone
()))
{
userCouponPageVo
.
setPhone
(
userCouponFindDTO
.
getPhone
());
}
else
{
userCouponPageVo
.
setPhone
(
userIdAndAppuserLoginMap
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
())
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
()).
getUsername
());
userCouponPageVo
.
setPhone
(
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
())
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
()).
getUsername
());
}
userCouponPageVos
.
add
(
userCouponPageVo
);
}
...
...
@@ -347,4 +347,11 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
userInfoDTO
.
setCouponNumber
(
couponNumber
);
return
userInfoDTO
;
}
public
void
deleteByUserIds
(
List
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
UserCoupon
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example
);
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/DateController.java
View file @
91d53ff8
...
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.rest;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.biz.ActivityPopularizeUserBiz
;
import
com.xxfc.platform.activity.biz.UserCouponBiz
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -23,9 +24,13 @@ public class DateController {
@Autowired
private
ActivityPopularizeUserBiz
activityPopularizeUserBiz
;
private
UserCouponBiz
userCouponBiz
;
@GetMapping
(
"/clear"
)
public
ObjectRestResponse
<
Void
>
clearDate
(
@RequestParam
(
value
=
"userIds"
)
List
<
Integer
>
userIds
){
activityPopularizeUserBiz
.
deleteByUserIds
(
userIds
);
userCouponBiz
.
deleteByUserIds
(
userIds
);
return
ObjectRestResponse
.
succ
();
}
}
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