Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
45bf802b
Commit
45bf802b
authored
Oct 14, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存人群修改
parent
c359b206
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
GroupChatActivityJoinServiceImpl.java
...e/service/chat/impl/GroupChatActivityJoinServiceImpl.java
+8
-17
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatActivityJoinServiceImpl.java
View file @
45bf802b
...
...
@@ -54,33 +54,24 @@ public class GroupChatActivityJoinServiceImpl implements GroupChatActivityJoinSe
public
void
saveActivityJoin
(
TabGroupChatActivity
activity
,
List
<
TabGroupChatActivityJoin
>
rewardList
)
{
Long
chatActivityId
=
activity
.
getChatActivityId
();
List
<
TabGroupChatActivityJoin
>
oldJoinList
=
listByActivityId
(
chatActivityId
);
Map
<
Integer
,
TabGroupChatActivityJoin
>
oldRewardMap
=
oldJoinList
.
stream
().
collect
(
Collectors
.
toMap
(
TabGroupChatActivityJoin:
:
getIndex
,
v
->
v
));
Map
<
Long
,
TabGroupChatActivityJoin
>
oldRewardMap
=
oldJoinList
.
stream
().
collect
(
Collectors
.
toMap
(
TabGroupChatActivityJoin:
:
getChatActivityJoinId
,
v
->
v
));
//先删除
businessManager
.
dealMemberTagByActivity
(
activity
,
null
,
true
);
rewardList
.
forEach
(
rule
->{
Integer
index
=
rule
.
getIndex
();
TabGroupChatActivityJoin
oldRule
=
oldRewardMap
.
get
(
index
);
if
(
oldRule
!=
null
)
{
oldRewardMap
.
remove
(
index
);
rule
.
setChatActivityJoinId
(
oldRule
.
getChatActivityJoinId
());
}
Long
chatActivityJoinId
=
rule
.
getChatActivityJoinId
();
if
(
chatActivityJoinId
!=
null
)
{
oldRewardMap
.
remove
(
chatActivityJoinId
);
}
if
(
chatActivityJoinId
==
null
)
{
rule
.
setChatActivityJoinId
(
UniqueIdUtils
.
uniqueLong
());
groupChatActivityJoinMapper
.
insert
(
rule
);
}
else
{
groupChatActivityJoinMapper
.
update
(
rule
);
}
businessManager
.
dealMemberTagByActivity
(
activity
,
rule
,
false
);
});
oldRewardMap
.
forEach
((
k
,
v
)
->
groupChatActivityJoinMapper
.
deleteById
(
v
.
getChatActivityJoinId
()));
List
<
TabGroupChatActivityJoin
>
newJoinList
=
listByActivityId
(
chatActivityId
);
//先删除
businessManager
.
dealMemberTagByActivity
(
activity
,
null
,
true
);
for
(
TabGroupChatActivityJoin
activityJoin
:
newJoinList
)
{
//处理会员分组
businessManager
.
dealMemberTagByActivity
(
activity
,
activityJoin
,
false
);
}
}
}
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