Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
0f248091
Commit
0f248091
authored
Sep 16, 2023
by
唐峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理微信unionId查询无用户设为静默异常,处理极验响应异常导致的空指针
parent
ab2c4a61
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
UserApiV2Controller.java
...uantgroup/xyqb/controller/api/v2/UserApiV2Controller.java
+2
-2
GeetestLib.java
...n/java/cn/quantgroup/xyqb/service/captcha/GeetestLib.java
+8
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/api/v2/UserApiV2Controller.java
View file @
0f248091
...
...
@@ -168,7 +168,7 @@ public class UserApiV2Controller implements IBaseController {
wechatUserInfo
=
wechatService
.
findWechatUserInfoFromDb
(
batchInfoReq
.
getOpenIds
(),
batchInfoReq
.
getAppId
(),
tenantId
);
List
<
Long
>
userIds
=
wechatUserInfo
.
stream
().
map
(
WechatUserInfo:
:
getUserId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
wechatUserInfo
)
||
CollectionUtils
.
isEmpty
(
userIds
))
{
throw
new
BizException
(
BizExceptionEnum
.
UN_EXIT_USER
);
throw
new
Silent
BizException
(
BizExceptionEnum
.
UN_EXIT_USER
);
}
userList
=
userRepository
.
findByIdInAndTenantId
(
userIds
,
tenantId
);
...
...
@@ -178,7 +178,7 @@ public class UserApiV2Controller implements IBaseController {
wechatUserInfo
=
wechatService
.
findUnionIdsAndOpenIdAndTenantId
(
batchInfoReq
.
getUnionIds
(),
batchInfoReq
.
getAppId
(),
tenantId
);
List
<
Long
>
userIds
=
wechatUserInfo
.
stream
().
filter
(
e
->
e
.
getUserId
()
!=
null
).
map
(
WechatUserInfo:
:
getUserId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
wechatUserInfo
)
||
CollectionUtils
.
isEmpty
(
userIds
))
{
throw
new
BizException
(
BizExceptionEnum
.
UN_EXIT_USER
);
throw
new
Silent
BizException
(
BizExceptionEnum
.
UN_EXIT_USER
);
}
userList
=
userRepository
.
findByIdInAndTenantId
(
userIds
,
tenantId
);
...
...
src/main/java/cn/quantgroup/xyqb/service/captcha/GeetestLib.java
View file @
0f248091
...
...
@@ -299,6 +299,7 @@ public class GeetestLib {
String
return_seccode
=
""
;
try
{
JSONObject
return_map
=
JSONObject
.
parseObject
(
response
);
return_map
=
return_map
==
null
?
new
JSONObject
():
return_map
;
return_seccode
=
return_map
.
getString
(
"seccode"
);
gtlog
(
"md5: "
+
Md5Util
.
build
(
return_seccode
));
if
(
return_seccode
.
equals
(
Md5Util
.
build
(
seccode
)))
{
...
...
@@ -446,4 +447,11 @@ public class GeetestLib {
}
}
public
static
void
main
(
String
[]
args
)
{
JSONObject
return_map
=
JSONObject
.
parseObject
(
""
);
return_map
=
return_map
==
null
?
new
JSONObject
():
return_map
;
System
.
out
.
println
(
return_map
.
toString
());
}
}
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