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
a1903fc9
Commit
a1903fc9
authored
Dec 11, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取用户是否参加活动
parent
3ad83ec2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
ActivityPopularizeUserBiz.java
...xxfc/platform/activity/biz/ActivityPopularizeUserBiz.java
+15
-16
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopularizeUserBiz.java
View file @
a1903fc9
...
@@ -43,22 +43,21 @@ public class ActivityPopularizeUserBiz extends BaseBiz<ActivityPopularizeUserMap
...
@@ -43,22 +43,21 @@ public class ActivityPopularizeUserBiz extends BaseBiz<ActivityPopularizeUserMap
return
map
;
return
map
;
}
}
map
.
put
(
"userId"
,
userId
);
map
.
put
(
"userId"
,
userId
);
Example
example
=
new
Example
(
ActivityPopularizeUser
.
class
);
List
<
Map
<
Integer
,
Boolean
>>
activityIds
=
Lists
.
newArrayList
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
popularizeIds
.
parallelStream
().
forEach
(
id
->
{
criteria
.
andEqualTo
(
"userId"
,
userId
);
Example
example
=
new
Example
(
ActivityPopularizeUser
.
class
);
criteria
.
andIn
(
"popularizeId"
,
popularizeIds
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
List
<
ActivityPopularizeUser
>
activityPopularizeUsers
=
mapper
.
selectByExample
(
example
);
criteria
.
andEqualTo
(
"userId"
,
userId
);
if
(
activityPopularizeUsers
==
null
||
activityPopularizeUsers
.
size
()
<=
0
)
{
criteria
.
andEqualTo
(
"popularizeId"
,
popularizeIds
);
return
map
;
ActivityPopularizeUser
activityPopularizeUsers
=
mapper
.
selectOneByExample
(
example
);
}
Map
<
Integer
,
Boolean
>
map1
=
Maps
.
newHashMap
();
List
<
Map
<
Integer
,
Boolean
>>
activityIds
=
Lists
.
newArrayList
();
if
(
activityPopularizeUsers
!=
null
)
{
activityPopularizeUsers
.
parallelStream
().
forEach
(
result
->
{
map1
.
put
(
id
,
true
);
if
(
popularizeIds
.
contains
(
result
.
getPopularizeId
()))
{
}
else
{
Map
<
Integer
,
Boolean
>
map1
=
Maps
.
newHashMap
();
map1
.
put
(
id
,
false
);
map1
.
put
(
result
.
getPopularizeId
(),
true
);
}
activityIds
.
add
(
map1
);
activityIds
.
add
(
map1
);
}
});
});
map
.
put
(
"popularizeIds"
,
activityIds
);
map
.
put
(
"popularizeIds"
,
activityIds
);
return
map
;
return
map
;
}
}
...
...
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