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
3e027ee0
Commit
3e027ee0
authored
Nov 18, 2021
by
李健华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册用户判断无论是否新增用户添加映射
parent
88fa6bec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+8
-3
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/InnerController.java
View file @
3e027ee0
...
@@ -309,6 +309,9 @@ public class InnerController implements IBaseController {
...
@@ -309,6 +309,9 @@ public class InnerController implements IBaseController {
if
(
registeredFrom
==
null
)
{
if
(
registeredFrom
==
null
)
{
registeredFrom
=
0L
;
registeredFrom
=
0L
;
}
}
if
(
tenantId
==
null
)
{
tenantId
=
TenantUtil
.
TENANT_DEFAULT
;
}
User
user
=
userService
.
findByPhoneWithCache
(
phoneNo
);
User
user
=
userService
.
findByPhoneWithCache
(
phoneNo
);
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
...
@@ -317,15 +320,17 @@ public class InnerController implements IBaseController {
...
@@ -317,15 +320,17 @@ public class InnerController implements IBaseController {
log
.
info
(
"用户已经注销,phoneNo:{}"
,
phoneNo
);
log
.
info
(
"用户已经注销,phoneNo:{}"
,
phoneNo
);
return
JsonResult
.
buildErrorStateResult
(
"用户已经注销"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户已经注销"
,
null
);
}
}
// 插入关联数据
iOauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
//已存在用户
//已存在用户
return
JsonResult
.
buildSuccessResult
(
null
,
new
UserRet
(
user
));
return
JsonResult
.
buildSuccessResult
(
null
,
new
UserRet
(
user
));
}
}
//注册新用户
//注册新用户
user
=
userRegisterService
.
register
(
registeredFrom
,
phoneNo
,
null
,
null
,
0L
,
0L
);
user
=
userRegisterService
.
register
(
registeredFrom
,
phoneNo
,
null
,
null
,
0L
,
0L
);
//校验租户ID tenantId
//校验租户ID tenantId
if
(
tenantId
!=
null
&&
!
tenantId
.
equals
(
0
))
{
iOauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
iOauthLoginInfoService
.
addLoginInfo
(
user
,
tenantId
);
}
return
JsonResult
.
buildSuccessResult
(
null
,
new
UserRet
(
user
));
return
JsonResult
.
buildSuccessResult
(
null
,
new
UserRet
(
user
));
}
}
...
...
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