Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 92b46606
authored
Jul 29, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话存档定时任务修改
1 parent
14131f86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
linkwe-quartz/src/main/java/com/linkwechat/quartz/task/ConversationArchiveTask.java
linkwe-quartz/src/main/java/com/linkwechat/quartz/task/ConversationArchiveTask.java
View file @
92b4660
...
...
@@ -32,21 +32,22 @@ public class ConversationArchiveTask {
@Autowired
private
IWeChatContactMsgService
weChatContactMsgService
;
public
void
FinanceTask
(
String
corpId
,
String
secret
,
String
privateKey
){
log
.
info
(
"
执行有参方法: params:{},{}"
,
corpId
,
secret
);
public
void
FinanceTask
(){
log
.
info
(
"
会话存档定时任务执行----------------->"
);
Long
seqLong
=
0L
;
log
.
info
(
">>>>>>>seq:{}"
,
seqLong
);
if
(
StringUtils
.
isEmpty
(
privateKey
)){
WeCorpAccount
validWeCorpAccount
=
weCorpAccountService
.
findValidWeCorpAccount
();
privateKey
=
validWeCorpAccount
.
getFinancePrivateKey
();
WeCorpAccount
corpAccount
=
weCorpAccountService
.
findValidWeCorpAccount
();
if
(
corpAccount
==
null
){
log
.
info
(
"无有效企业----------------->"
);
return
;
}
LambdaQueryWrapper
<
WeChatContactMsg
>
wrapper
=
new
LambdaQueryWrapper
<
WeChatContactMsg
>().
orderByDesc
(
WeChatContactMsg:
:
getSeq
).
last
(
"limit 1"
);
WeChatContactMsg
weChatContactMsg
=
weChatContactMsgService
.
getOne
(
wrapper
);
if
(
weChatContactMsg
!=
null
){
seqLong
=
weChatContactMsg
.
getSeq
();
}
FinanceService
financeService
=
new
FinanceService
(
corp
Id
,
secret
,
privateKey
);
FinanceService
financeService
=
new
FinanceService
(
corp
Account
.
getCorpId
(),
corpAccount
.
getChatSecret
(),
corpAccount
.
getFinancePrivateKey
()
);
financeService
.
getChatData
(
seqLong
,(
data
)
->
redisCache
.
convertAndSend
(
WeConstans
.
CONVERSATION_MSG_CHANNEL
,
data
));
log
.
info
(
"会话存档定时任务执行完成----------------->"
);
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment