Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-miniappserver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b045058c
authored
Jul 01, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
微信小程序C端账号体系
1 parent
9d16beb7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
src/main/java/cn/com/glsx/app/modules/ThirdLoginController.java
src/main/java/cn/com/glsx/app/modules/service/LoginService.java
src/main/resources/mapper/UserLocalAccountMapper.xml
src/main/java/cn/com/glsx/app/modules/ThirdLoginController.java
View file @
b045058
...
@@ -96,8 +96,6 @@ public class ThirdLoginController {
...
@@ -96,8 +96,6 @@ public class ThirdLoginController {
if
(
optUserId
.
isPresent
())
{
if
(
optUserId
.
isPresent
())
{
//已绑定本地账号
//已绑定本地账号
AppUser
user
=
userService
.
getAppUserByUserId
(
authRel
.
getUserId
());
AppUser
user
=
userService
.
getAppUserByUserId
(
authRel
.
getUserId
());
user
.
setUserType
(
MiniUserType
.
NORMAL
.
getType
());
String
token
=
userService
.
createToken
(
user
);
String
token
=
userService
.
createToken
(
user
);
rtnMap
.
put
(
"user"
,
user
);
rtnMap
.
put
(
"user"
,
user
);
rtnMap
.
put
(
"token"
,
token
);
rtnMap
.
put
(
"token"
,
token
);
...
...
src/main/java/cn/com/glsx/app/modules/service/LoginService.java
View file @
b045058
...
@@ -69,9 +69,7 @@ public class LoginService {
...
@@ -69,9 +69,7 @@ public class LoginService {
User
user
=
register
(
simpleUser
);
User
user
=
register
(
simpleUser
);
//返给前端的用户信息
//返给前端的用户信息
AppUser
appUser
=
UserConverter
.
INSTANCE
.
su2au
(
simpleUser
);
return
UserConverter
.
INSTANCE
.
su2au
(
simpleUser
);
appUser
.
setUserType
(
MiniUserType
.
NORMAL
.
getType
());
return
appUser
;
}
else
if
(
loginBO
.
getLoginType
()
==
2
)
{
}
else
if
(
loginBO
.
getLoginType
()
==
2
)
{
//验证码校验
//验证码校验
//smsService.verifyCode(loginBO.getAccount(), loginBO.getCode());
//smsService.verifyCode(loginBO.getAccount(), loginBO.getCode());
...
@@ -120,7 +118,7 @@ public class LoginService {
...
@@ -120,7 +118,7 @@ public class LoginService {
UserAuthRel
userAuthRel
=
userAuthRelMapper
.
selectByAuthTypeAndAuthId
(
AuthType
.
LOCAL
.
getType
(),
localAuth
.
getId
());
UserAuthRel
userAuthRel
=
userAuthRelMapper
.
selectByAuthTypeAndAuthId
(
AuthType
.
LOCAL
.
getType
(),
localAuth
.
getId
());
if
(
userAuthRel
==
null
)
{
if
(
userAuthRel
==
null
)
{
user
=
new
User
();
user
=
new
User
();
user
.
set
Link
erId
(
simpleUser
.
getId
());
user
.
set
RelUs
erId
(
simpleUser
.
getId
());
user
.
setBlacklist
(
simpleUser
.
getBlacklist
());
user
.
setBlacklist
(
simpleUser
.
getBlacklist
());
userMapper
.
saveOrUpdate
(
user
);
userMapper
.
saveOrUpdate
(
user
);
...
...
src/main/resources/mapper/UserLocalAccountMapper.xml
View file @
b045058
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
tcu.id as cuserId,
tcu.id as cuserId,
tcula.account,
tcula.account,
tcula2.username,
tcula2.username,
'normal' as userType,
tcu.blacklist
tcu.blacklist
from t_cust_user_local_auth tcula
from t_cust_user_local_auth tcula
inner join t_cust_user_auth_rel tcuar on tcula.id = tcuar.auth_id
inner join t_cust_user_auth_rel tcuar on tcula.id = tcuar.auth_id
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment