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