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
dc11c6d7
Commit
dc11c6d7
authored
Jul 20, 2023
by
王亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an issue.(jiguang)
parent
f3eb584f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
SMSDirectJiLoginStrategy.java
.../quantgroup/xyqb/service/v2/SMSDirectJiLoginStrategy.java
+8
-3
No files found.
src/main/java/cn/quantgroup/xyqb/service/v2/SMSDirectJiLoginStrategy.java
View file @
dc11c6d7
...
...
@@ -5,7 +5,6 @@ import cn.quantgroup.xyqb.controller.req.v2.LoginReq;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.exception.BizException
;
import
cn.quantgroup.xyqb.exception.BizExceptionEnum
;
import
cn.quantgroup.xyqb.exception.UserNotExistException
;
import
cn.quantgroup.xyqb.model.*
;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
cn.quantgroup.xyqb.model.v2.login.BaseLoginParam
;
...
...
@@ -75,7 +74,7 @@ public class SMSDirectJiLoginStrategy implements LoginStrategy {
if
(
jiGuangResponseParam
==
null
||
8000
!=
jiGuangResponseParam
.
getCode
())
{
throw
new
BizException
(
BizExceptionEnum
.
ERROR_DIRECT_LOGIN
);
}
else
{
}
else
{
smsLoginParam
.
setPhone
(
jiGuangResponseParam
.
getPhone
());
}
...
...
@@ -86,7 +85,13 @@ public class SMSDirectJiLoginStrategy implements LoginStrategy {
if
(
user
!=
null
&&
!
user
.
getEnable
())
{
log
.
info
(
"用户不存在,或者已经注销,phoneNo:{}"
,
smsLoginParam
.
getPhone
());
throw
new
BizException
(
BizExceptionEnum
.
ERROR_OR_ENABLE_ERROR
);
}
else
{
//用户用户为空,则注册一个新用户
if
(
user
==
null
)
{
user
=
userRegisterService
.
register
(
sessionStruct
.
getRegisteredFrom
(),
smsLoginParam
.
getPhone
(),
sessionStruct
.
getTenantId
());
}
}
if
(
scIsOpen
)
{
try
{
if
(!
StringUtils
.
isEmpty
(
sessionStruct
.
getScDeviceId
()))
{
...
...
@@ -118,7 +123,7 @@ public class SMSDirectJiLoginStrategy implements LoginStrategy {
LoginProperties
loginProperties
=
new
LoginProperties
(
1
,
sessionStruct
.
getRegisteredFrom
(),
sessionStruct
.
getTenantId
());
AuthBean
authBean
=
sessionService
.
createSession
(
user
,
loginProperties
,
LoginType
.
AUTHLOGIN
.
ordinal
(),
sessionStruct
.
getTenantId
(),
false
);
AuthBean
authBean
=
sessionService
.
createSession
(
user
,
loginProperties
,
LoginType
.
AUTHLOGIN
.
ordinal
(),
sessionStruct
.
getTenantId
(),
false
);
LoginBean
loginBean
=
new
LoginBean
();
if
(
authBean
!=
null
)
{
loginBean
.
setToken
(
authBean
.
getToken
());
...
...
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