Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
Project
Project
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
mengmeng
pension
Commits
22eeac2a
Commit
22eeac2a
authored
Mar 19, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.注册、登录、切换身份
parent
545beac6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
UserServiceImpl.java
...i/src/main/java/io/hmit/service/impl/UserServiceImpl.java
+7
-0
No files found.
hmit-api/src/main/java/io/hmit/service/impl/UserServiceImpl.java
View file @
22eeac2a
...
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
UserServiceImpl
extends
BaseServiceImpl
<
UserDao
,
UserEntity
>
implements
UserService
{
...
...
@@ -99,6 +100,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
map
.
put
(
"token"
,
tokenEntity
.
getToken
());
map
.
put
(
"expire"
,
tokenEntity
.
getExpireDate
().
getTime
()
-
System
.
currentTimeMillis
());
List
<
UserRoleInfoDTO
>
roles
=
userDao
.
getUserRoleInfo
(
user
.
getId
());
roles
=
roles
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
map
.
put
(
"roles"
,
roles
);
return
map
;
...
...
@@ -134,6 +136,11 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
@Override
public
void
registerUser
(
UserRegisterDTO
dto
)
{
UserEntity
reRegister
=
getByOpenId
(
dto
.
getOpenid
());
if
(
null
!=
reRegister
)
{
reRegister
.
setOpenid
(
""
);
updateById
(
reRegister
);
}
UserRegisterDTO
userRegisterDTO
=
getUserInfoByIdCardNo
(
dto
.
getIdCardNo
());
UserEntity
userEntity
;
if
(
null
!=
userRegisterDTO
)
{
...
...
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