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
aec3c8bc
Commit
aec3c8bc
authored
Oct 29, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
parents
ad1a5cdc
d81f6dbf
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 @
aec3c8bc
...
@@ -749,14 +749,7 @@ public class RedisTask {
...
@@ -749,14 +749,7 @@ public class RedisTask {
@XxlJob
(
"AutoUpdateOpenid"
)
@XxlJob
(
"AutoUpdateOpenid"
)
public
void
AutoUpdateOpenid
()
{
public
void
AutoUpdateOpenid
()
{
logger
.
debug
(
"AutoUpdateOpenid:自动更新用户unionid开始"
);
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
<>();
List
<
String
>
list
=
new
ArrayList
<>();
if
(
sConsumerTokenList
.
size
()
>
100
)
{
sConsumerTokenList
=
sConsumerTokenList
.
subList
(
0
,
100
);
}
List
<
String
>
wechatUSERList
=
wechatNewService
.
getWechatUSERList
(
list
,
""
);
List
<
String
>
wechatUSERList
=
wechatNewService
.
getWechatUSERList
(
list
,
""
);
Map
<
String
,
String
>
openIdMap
=
new
ConcurrentHashMap
<>();
Map
<
String
,
String
>
openIdMap
=
new
ConcurrentHashMap
<>();
// 使用IntStream优化分批逻辑,并行处理各批次数据
// 使用IntStream优化分批逻辑,并行处理各批次数据
...
@@ -771,6 +764,11 @@ public class RedisTask {
...
@@ -771,6 +764,11 @@ public class RedisTask {
logger
.
error
(
"处理微信用户信息失败"
,
e
);
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
->
{
sConsumerTokenList
.
forEach
(
item
->
{
String
openId
=
openIdMap
.
get
(
item
.
getUnionId
());
String
openId
=
openIdMap
.
get
(
item
.
getUnionId
());
if
(
openId
!=
null
)
{
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