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 de3659b7
authored
Jul 29, 2021
by
danmo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话存档定时任务修改
1 parent
70f1c6e2
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 @
de3659b
...
@@ -32,21 +32,22 @@ public class ConversationArchiveTask {
...
@@ -32,21 +32,22 @@ public class ConversationArchiveTask {
@Autowired
@Autowired
private
IWeChatContactMsgService
weChatContactMsgService
;
private
IWeChatContactMsgService
weChatContactMsgService
;
public
void
FinanceTask
(
String
corpId
,
String
secret
,
String
privateKey
){
public
void
FinanceTask
(){
log
.
info
(
"
执行有参方法: params:{},{}"
,
corpId
,
secret
);
log
.
info
(
"
会话存档定时任务执行----------------->"
);
Long
seqLong
=
0L
;
Long
seqLong
=
0L
;
log
.
info
(
">>>>>>>seq:{}"
,
seqLong
);
log
.
info
(
">>>>>>>seq:{}"
,
seqLong
);
if
(
StringUtils
.
isEmpty
(
privateKey
)){
WeCorpAccount
corpAccount
=
weCorpAccountService
.
findValidWeCorpAccount
();
WeCorpAccount
validWeCorpAccount
=
weCorpAccountService
.
findValidWeCorpAccount
();
if
(
corpAccount
==
null
){
privateKey
=
validWeCorpAccount
.
getFinancePrivateKey
();
log
.
info
(
"无有效企业----------------->"
);
return
;
}
}
LambdaQueryWrapper
<
WeChatContactMsg
>
wrapper
=
new
LambdaQueryWrapper
<
WeChatContactMsg
>().
orderByDesc
(
WeChatContactMsg:
:
getSeq
).
last
(
"limit 1"
);
LambdaQueryWrapper
<
WeChatContactMsg
>
wrapper
=
new
LambdaQueryWrapper
<
WeChatContactMsg
>().
orderByDesc
(
WeChatContactMsg:
:
getSeq
).
last
(
"limit 1"
);
WeChatContactMsg
weChatContactMsg
=
weChatContactMsgService
.
getOne
(
wrapper
);
WeChatContactMsg
weChatContactMsg
=
weChatContactMsgService
.
getOne
(
wrapper
);
if
(
weChatContactMsg
!=
null
){
if
(
weChatContactMsg
!=
null
){
seqLong
=
weChatContactMsg
.
getSeq
();
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
));
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