Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
d81f6dbf
Commit
d81f6dbf
authored
Oct 29, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
3aedc4f8
e8c49f10
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+5
-7
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
d81f6dbf
...
...
@@ -749,14 +749,7 @@ public class RedisTask {
@XxlJob
(
"AutoUpdateOpenid"
)
public
void
AutoUpdateOpenid
()
{
logger
.
debug
(
"AutoUpdateOpenid:自动更新用户unionid开始"
);
List
<
SConsumerToken
>
sConsumerTokenList
=
sConsumerTokenService
.
list
(
new
LambdaQueryWrapper
<
SConsumerToken
>().
isNotNull
(
SConsumerToken:
:
getUnionId
).
isNull
(
SConsumerToken:
:
getOpenId
));
if
(
CollectionUtils
.
isEmpty
(
sConsumerTokenList
))
{
return
;
}
List
<
String
>
list
=
new
ArrayList
<>();
if
(
sConsumerTokenList
.
size
()
>
100
)
{
sConsumerTokenList
=
sConsumerTokenList
.
subList
(
0
,
100
);
}
List
<
String
>
wechatUSERList
=
wechatNewService
.
getWechatUSERList
(
list
,
""
);
Map
<
String
,
String
>
openIdMap
=
new
ConcurrentHashMap
<>();
// 使用IntStream优化分批逻辑,并行处理各批次数据
...
...
@@ -771,6 +764,11 @@ public class RedisTask {
logger
.
error
(
"处理微信用户信息失败"
,
e
);
}
});
//获取openIdMap所有的键
List
<
SConsumerToken
>
sConsumerTokenList
=
sConsumerTokenService
.
list
(
new
LambdaQueryWrapper
<
SConsumerToken
>().
in
(
SConsumerToken:
:
getUnionId
,
openIdMap
.
keySet
()).
isNull
(
SConsumerToken:
:
getOpenId
));
if
(
CollectionUtils
.
isEmpty
(
sConsumerTokenList
))
{
return
;
}
sConsumerTokenList
.
forEach
(
item
->
{
String
openId
=
openIdMap
.
get
(
item
.
getUnionId
());
if
(
openId
!=
null
)
{
...
...
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