mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-04-08 06:27:36 +00:00
职位->岗位
This commit is contained in:
@@ -120,13 +120,13 @@ public class UserRolePermissionOperatorTool {
|
|||||||
new PositionBindDto(user.getId(), positions.stream().map(Position::getId).toList()));
|
new PositionBindDto(user.getId(), positions.stream().map(Position::getId).toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Tool(value = "给用户解绑/撤销职位")
|
@Tool(value = "给用户解绑/撤销岗位")
|
||||||
void unbindPositionToUser(
|
void unbindPositionToUser(
|
||||||
@P(value = "用户名") String username, @P(value = "职位名称列表") List<String> positionNames) {
|
@P(value = "用户名") String username, @P(value = "岗位名称列表") List<String> positionNames) {
|
||||||
User user = checkUserExistBy(username);
|
User user = checkUserExistBy(username);
|
||||||
List<Position> positions = positionRepository.fetchByName(positionNames.toArray(String[]::new));
|
List<Position> positions = positionRepository.fetchByName(positionNames.toArray(String[]::new));
|
||||||
if (positions.isEmpty()) {
|
if (positions.isEmpty()) {
|
||||||
throw new BusinessException("指定职位不存在");
|
throw new BusinessException("指定岗位不存在");
|
||||||
}
|
}
|
||||||
identityAccessService.unBindPositionBy(
|
identityAccessService.unBindPositionBy(
|
||||||
new PositionBindDto(user.getId(), positions.stream().map(Position::getId).toList()));
|
new PositionBindDto(user.getId(), positions.stream().map(Position::getId).toList()));
|
||||||
|
|||||||
Reference in New Issue
Block a user