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
03943e1a
Commit
03943e1a
authored
Dec 04, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社群群发-失效处理
parent
caa87e95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
19 deletions
+32
-19
GroupChatPlanServiceImpl.java
...e/service/service/chat/impl/GroupChatPlanServiceImpl.java
+31
-18
GroupChatPlanOwnerLogMapper.xml
...ain/resources/mapper/chat/GroupChatPlanOwnerLogMapper.xml
+1
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatPlanServiceImpl.java
View file @
03943e1a
...
...
@@ -696,18 +696,27 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
List
<
GroupChatPlanOwnerLogDTO
>
list
=
this
.
groupChatPlanOwnerLogMapper
.
listForCancelSend
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
GroupChatPlanOwnerLogDTO
dto
:
list
)
{
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
()
;
String
msgid
=
dto
.
getMsgid
()
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
String
secret
=
config
.
getWxSuiteid
()
;
if
(
qwDTO
.
isSelf
())
{
secret
=
qwDTO
.
getSelfSecret
()
;
}
ServiceResponse
<
Void
>
resp
=
this
.
qywxSuiteApiService
.
cancelGroupmsgSend
(
qwDTO
.
getThirdCorpid
(),
secret
,
msgid
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
())
;
if
(
resp
.
isSuccess
())
{
this
.
groupChatPlanOwnerLogMapper
.
giveUp
(
dto
.
getOwnerLogId
())
;
}
this
.
cancelSend
(
dto
);
}
}
}
private
void
cancelSend
(
GroupChatPlanOwnerLogDTO
dto
)
{
try
{
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
();
String
msgid
=
dto
.
getMsgid
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
String
secret
=
config
.
getWxSuiteid
();
if
(
qwDTO
.
isSelf
())
{
secret
=
qwDTO
.
getSelfSecret
();
}
ServiceResponse
<
Void
>
resp
=
this
.
qywxSuiteApiService
.
cancelGroupmsgSend
(
qwDTO
.
getThirdCorpid
(),
secret
,
msgid
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
resp
.
isSuccess
())
{
this
.
groupChatPlanOwnerLogMapper
.
giveUp
(
dto
.
getOwnerLogId
());
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"异常"
,
e
);
}
}
...
...
@@ -723,13 +732,17 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
private
void
updateMsgid
(
GroupChatPlanOwnerLogDTO
dto
)
{
Long
ownerLogId
=
dto
.
getOwnerLogId
()
;
String
staffId
=
dto
.
getStaffId
()
;
Date
sendTime
=
dto
.
getSendTime
()
;
String
msgid
=
this
.
getQwMsgId
(
staffId
,
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
.
group
)
;
if
(
null
!=
msgid
)
{
logger
.
info
(
"获取msgid={},{}"
,
ownerLogId
,
msgid
);
this
.
groupChatPlanOwnerLogMapper
.
updateMsgid
(
ownerLogId
,
msgid
);
try
{
Long
ownerLogId
=
dto
.
getOwnerLogId
()
;
String
staffId
=
dto
.
getStaffId
()
;
Date
sendTime
=
dto
.
getSendTime
()
;
String
msgid
=
this
.
getQwMsgId
(
staffId
,
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
.
group
)
;
if
(
null
!=
msgid
)
{
logger
.
info
(
"获取msgid={},{}"
,
ownerLogId
,
msgid
);
this
.
groupChatPlanOwnerLogMapper
.
updateMsgid
(
ownerLogId
,
msgid
);
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"异常"
,
e
);
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatPlanOwnerLogMapper.xml
View file @
03943e1a
...
...
@@ -105,7 +105,7 @@
</update>
<update
id=
"giveUp"
parameterType=
"java.lang.Long"
>
update tab_haoban_group_chat_plan_owner_log set s
tatus_flag
= 3 where owner_log_id = #{id}
update tab_haoban_group_chat_plan_owner_log set s
end_status
= 3 where owner_log_id = #{id}
</update>
<!-- ============ 查询=============-->
...
...
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