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
a034a14e
Commit
a034a14e
authored
Jun 29, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群满处理活码30天
parent
9e1b9339
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
GroupChatHmServiceImpl.java
...age/service/service/chat/impl/GroupChatHmServiceImpl.java
+18
-4
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+1
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatHmServiceImpl.java
View file @
a034a14e
...
...
@@ -130,6 +130,14 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
return
null
;
}
this
.
updateLinkCount
(
hm
.
getWxEnterpriseId
(),
Arrays
.
asList
(
hmId
));
String
wxEnterpriseId
=
hm
.
getWxEnterpriseId
();
;
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
wxEnterpriseId
,
SecretTypeEnum
.
CUSTOMIZED_APP
.
getVal
());
if
(
null
!=
secretSetting
&&
hm
.
getAutoCreateRoom
()
==
1
)
{
List
<
TabGroupChatHmRelation
>
chatRelation
=
this
.
groupChatHmRelationMapper
.
listByChatHmId
(
hmId
);
if
(
CollectionUtils
.
isNotEmpty
(
chatRelation
))
{
this
.
handleAutoCreateRoom
(
wxEnterpriseId
,
secretSetting
.
getSecretVal
(),
hm
,
chatRelation
,
null
);
}
}
GroupChatHmBO
bo
=
EntityUtil
.
changeEntityByJSON
(
GroupChatHmBO
.
class
,
hm
);
return
bo
;
}
...
...
@@ -192,14 +200,16 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
String
configId
=
hm
.
getWxConfigId
();
ServiceResponse
<
AddJoinWayDTO
>
joinResp
=
this
.
qywxChatApiService
.
getJoinWay
(
qwDTO
.
getDkCorpid
(),
secret
,
configId
,
qwDTO
.
getUrlHost
());
logger
.
info
(
"查询群活码={}"
,
JSON
.
toJSON
(
joinResp
));
logger
.
info
(
"
处理群活码满-
查询群活码={}"
,
JSON
.
toJSON
(
joinResp
));
if
(
joinResp
.
isSuccess
())
{
AddJoinWayDTO
join
=
joinResp
.
getResult
();
List
<
String
>
qwChatIdList
=
join
.
getChat_id_list
();
if
(
CollectionUtils
.
isNotEmpty
(
qwChatIdList
))
{
if
(
qwChatIdList
.
size
()
==
1
)
{
logger
.
info
(
"只有1个群"
);
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
if
(
null
!=
thisGroupChatId
)
{
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
}
return
;
}
List
<
Long
>
chatIdList
=
chatRelation
.
stream
().
map
(
dto
->
dto
.
getGroupChatId
())
...
...
@@ -211,7 +221,9 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
List
<
String
>
qwList
=
RolesListUtils
.
differenceList
(
qwChatIdList
,
hbIdList
);
if
(
qwChatIdList
.
size
()
==
hbIdList
.
size
()
&&
CollectionUtils
.
isEmpty
(
qwList
))
{
logger
.
info
(
"群未变化"
);
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
if
(
null
!=
thisGroupChatId
)
{
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
}
return
;
}
// 处理要踢的
...
...
@@ -255,7 +267,9 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByWxWxChatIdListDk
(
wxEnterpriseId
,
qwChatIdList
);
if
(
CollectionUtils
.
isEmpty
(
list
)
||
list
.
size
()
!=
qwChatIdList
.
size
())
{
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
if
(
null
!=
thisGroupChatId
)
{
this
.
saveChatFullNotice
(
wxEnterpriseId
,
thisGroupChatId
);
}
logger
.
info
(
"查询群列表空,或数量不一致,dkList={}"
,
qwChatIdList
);
return
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
a034a14e
...
...
@@ -1144,7 +1144,7 @@ public class GroupChatServiceImpl implements GroupChatService {
if
(
null
==
chat
||
chat
.
getTotalCount
()
<
offNum
)
{
continue
;
}
if
(
chat
.
getOffTime
().
getTime
()
+
1000
*
60
*
60
*
8
<
new
Date
().
getTime
())
{
if
(
chat
.
getOffTime
().
getTime
()
+
1000
*
60
*
60
*
24
*
30
<
new
Date
().
getTime
())
{
logger
.
info
(
"超过8小时不重试groupChatId={}"
,
groupChatId
);
continue
;
}
...
...
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