Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
649a075e
Commit
649a075e
authored
Nov 15, 2022
by
fenghuazhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改焊工登录接口
parent
e8fd8899
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+17
-6
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
View file @
649a075e
...
...
@@ -104,17 +104,28 @@ public class WelderServiceImpl {
agencyUserModel
.
setRePassword
(
DesUtil
.
encode
(
jsonObject
.
getString
(
"phone"
),
secretKey
));
//用户角色信息
List
<
RoleModel
>
allRoleList
=
Privilege
.
roleClient
.
queryRoleList
(
null
,
null
).
getResult
();
if
(
1
==
jsonObject
.
getInteger
(
"isWelder"
)){
roleNameSet
.
add
(
OrgEnum
.
焊工
.
getName
());
}
else
{
roleNameSet
.
add
(
OrgEnum
.
普通人员
.
getName
());
}
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
r
.
getRoleName
().
equals
(
roleNameSet
)).
collect
(
Collectors
.
toList
());
roleNameSet
.
add
(
OrgEnum
.
普通人员
.
getName
());
//给登录人身份配置
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
{
for
(
String
roleName
:
roleNameSet
){
if
(
r
.
getRoleName
().
equals
(
roleName
)){
return
true
;
}
}
return
false
;
}).
collect
(
Collectors
.
toList
());
userRoleList
.
stream
().
forEach
(
r
->
{
if
(!
roleIds
.
contains
(
r
.
getSequenceNbr
()))
{
roleIds
.
add
(
r
.
getSequenceNbr
());
}
});
//登录人应用权限
List
<
String
>
appCodes
=
new
ArrayList
<>();
Map
<
String
,
String
>
map
=
new
HashMap
();
map
.
put
(
"APPKey"
,
OrgEnum
.
普通人员
.
getAppCode
());
appCodes
.
add
(
map
.
get
(
"APPKey"
));
agencyUserModel
.
setAppCodes
(
appCodes
);
roleSeqsMap
.
put
(
companyId
,
roleIds
);
orgRoles
.
put
(
companyId
,
userRoleList
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqsMap
);
...
...
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