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
92971fef
Commit
92971fef
authored
May 11, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/自建应用验证' into 'master'
Feature/自建应用验证 See merge request
!1245
parents
b003cf9b
f5957876
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
37 deletions
+38
-37
GroupChatHmServiceImpl.java
...age/service/service/chat/impl/GroupChatHmServiceImpl.java
+38
-37
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatHmServiceImpl.java
View file @
92971fef
...
...
@@ -214,51 +214,52 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
return
;
}
if
(
CollectionUtils
.
isNotEmpty
(
qwChatIdList
))
{
// 处理要踢的
for
(
String
wxChatId
:
qwChatIdList
)
{
TabGroupChat
chat
=
this
.
groupChatMapper
.
selectByWxChatIdDk
(
wxEnterpriseId
,
wxChatId
);
if
(
null
==
chat
)
{
continue
;
}
TabGroupChat
cid
=
null
;
String
staffId
=
chat
.
getStaffId
();
for
(
TabGroupChat
obj
:
chatList
)
{
if
(
obj
.
getStaffId
().
equals
(
staffId
))
{
if
(
null
==
cid
)
{
// 处理要踢的
List
<
String
>
bakQwChatIdList
=
EntityUtil
.
changeEntityListByJSON
(
String
.
class
,
qwChatIdList
);
for
(
String
wxChatId
:
bakQwChatIdList
)
{
TabGroupChat
chat
=
this
.
groupChatMapper
.
selectByWxChatIdDk
(
wxEnterpriseId
,
wxChatId
);
if
(
null
==
chat
)
{
continue
;
}
TabGroupChat
cid
=
null
;
String
staffId
=
chat
.
getStaffId
();
for
(
TabGroupChat
obj
:
chatList
)
{
if
(
obj
.
getStaffId
().
equals
(
staffId
))
{
if
(
null
==
cid
)
{
cid
=
obj
;
}
else
{
if
(
obj
.
getTotalCount
()
>
cid
.
getTotalCount
())
{
cid
=
obj
;
}
else
{
if
(
obj
.
getTotalCount
()
>
cid
.
getTotalCount
())
{
cid
=
obj
;
}
}
}
}
if
(
null
!=
cid
)
{
logger
.
info
(
"hm={},群={},要删={}"
,
wxChatId
,
qwChatIdList
,
cid
.
getWxChatId
());
Iterator
<
String
>
it
=
qwChatIdList
.
iterator
()
;
while
(
it
.
hasNext
())
{
if
(
it
.
next
().
equals
(
cid
.
getWxChatIdDk
()))
{
it
.
remove
();
}
}
// 保存活码
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByWxWxChatIdListDk
(
wxEnterpriseId
,
qwChatIdList
);
if
(
CollectionUtils
.
isEmpty
(
list
)
||
list
.
size
()
!=
qwChatIdList
.
size
())
{
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
logger
.
info
(
"查询群列表空,或数量不一致,dkList={}"
,
qwChatIdList
);
return
;
}
if
(
null
!=
cid
)
{
logger
.
info
(
"hm={},群={},要删={}"
,
wxChatId
,
qwChatIdList
,
cid
.
getWxChatId
());
Iterator
<
String
>
it
=
qwChatIdList
.
iterator
()
;
while
(
it
.
hasNext
())
{
if
(
it
.
next
().
equals
(
cid
.
getWxChatIdDk
()))
{
it
.
remove
();
break
;
}
List
<
Long
>
groupChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getGroupChatId
())
.
collect
(
Collectors
.
toList
());
GroupChatHmDTO
hmDTO
=
EntityUtil
.
changeEntityByJSON
(
GroupChatHmDTO
.
class
,
hm
);
hmDTO
.
setChatIdList
(
groupChatIdList
);
this
.
saveHm
(
hmDTO
,
2
);
}
}
}
}
logger
.
info
(
"处理后群活码应有的群={}"
,
qwChatIdList
);
// 保存活码
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByWxWxChatIdListDk
(
wxEnterpriseId
,
qwChatIdList
);
if
(
CollectionUtils
.
isEmpty
(
list
)
||
list
.
size
()
!=
qwChatIdList
.
size
())
{
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
logger
.
info
(
"查询群列表空,或数量不一致,dkList={}"
,
qwChatIdList
);
return
;
}
List
<
Long
>
groupChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getGroupChatId
())
.
collect
(
Collectors
.
toList
());
GroupChatHmDTO
hmDTO
=
EntityUtil
.
changeEntityByJSON
(
GroupChatHmDTO
.
class
,
hm
);
hmDTO
.
setChatIdList
(
groupChatIdList
);
this
.
saveHm
(
hmDTO
,
2
);
}
}
}
...
...
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