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
038d3aa8
Commit
038d3aa8
authored
Aug 11, 2025
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 30396 【现场问题】使用单位登录提示无该类型权限
parent
ad997621
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+2
-2
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+19
-16
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
038d3aa8
...
@@ -499,8 +499,8 @@ public class TzsUserInfoController extends BaseController {
...
@@ -499,8 +499,8 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/refreshUserGroupInfo"
)
@PostMapping
(
value
=
"/refreshUserGroupInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"同步人员信息"
,
notes
=
"同步人员信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"同步人员信息"
,
notes
=
"同步人员信息"
)
public
ResponseModel
<
TzsUserInfoDto
>
refreshUserInfo
(
@RequestBody
List
<
String
>
userIds
)
{
public
ResponseModel
<
TzsUserInfoDto
>
refreshUserInfo
(
@RequestBody
List
<
String
>
userIds
,
@RequestParam
(
required
=
false
)
boolean
refreshNonAdmin
)
{
tzsUserInfoServiceImpl
.
refreshUserGroupInfo
(
userIds
);
tzsUserInfoServiceImpl
.
refreshUserGroupInfo
(
userIds
,
refreshNonAdmin
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
038d3aa8
...
@@ -2413,19 +2413,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -2413,19 +2413,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
}
}
public
void
refreshAdminUserRole
(
List
<
TzsUserInfo
>
userInfos
,
List
<
String
>
userId
)
{
public
void
refreshAdminUserRole
(
List
<
RegUnitInfo
>
regUnitInfos
)
{
List
<
String
>
adminUserIdList
;
if
(
ValidationUtil
.
isEmpty
(
userInfos
))
{
adminUserIdList
=
userId
;
}
else
{
List
<
String
>
amosUserIdList
=
userInfos
.
stream
().
map
(
TzsUserInfo:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
adminUserIdList
=
userId
.
stream
().
filter
(
id
->
!
amosUserIdList
.
contains
(
id
)).
collect
(
Collectors
.
toList
());
}
if
(
ValidationUtil
.
isEmpty
(
adminUserIdList
))
{
return
;
}
List
<
RegUnitInfo
>
regUnitInfos
=
regUnitInfoService
.
lambdaQuery
().
in
(
RegUnitInfo:
:
getAdminUserId
,
adminUserIdList
).
list
();
List
<
String
>
useUnitCodes
=
regUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getUnitCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
useUnitCodes
=
regUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getUnitCode
).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
useUnitCodes
))
{
if
(
ValidationUtil
.
isEmpty
(
useUnitCodes
))
{
return
;
return
;
...
@@ -2477,14 +2465,29 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -2477,14 +2465,29 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
}
}
public
void
refreshUserGroupInfo
(
List
<
String
>
userId
)
{
public
void
refreshUserGroupInfo
(
List
<
String
>
userId
,
boolean
refreshNonAdmin
)
{
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
return
;
}
List
<
RegUnitInfo
>
adminRegUnitInfos
=
regUnitInfoService
.
lambdaQuery
().
in
(
RegUnitInfo:
:
getAdminUserId
,
userId
).
list
();
refreshAdminUserRole
(
adminRegUnitInfos
);
if
(!
refreshNonAdmin
)
{
return
;
}
List
<
String
>
amosAdminUserIdList
=
adminRegUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getAdminUserId
).
collect
(
Collectors
.
toList
());
userId
=
userId
.
stream
().
filter
(
id
->
!
amosAdminUserIdList
.
contains
(
id
)).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
return
;
return
;
}
}
// 根据userId获取用户
// 根据userId获取用户
List
<
TzsUserInfo
>
userInfos
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
List
<
TzsUserInfo
>
userInfos
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
in
(
TzsUserInfo:
:
getAmosUserId
,
userId
));
.
in
(
TzsUserInfo:
:
getAmosUserId
,
userId
).
eq
(
TzsUserInfo:
:
getIsDelete
,
false
));
refreshAdminUserRole
(
userInfos
,
userId
);
if
(
ObjectUtils
.
isEmpty
(
userInfos
))
{
if
(
ObjectUtils
.
isEmpty
(
userInfos
))
{
return
;
return
;
}
}
...
...
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