1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

Added getNoticeUser

This commit is contained in:
2023-06-04 02:26:06 +08:00
parent 860700ffea
commit b7962aa012
5 changed files with 53 additions and 0 deletions

View File

@@ -55,6 +55,13 @@ public class UserController {
return ResponseResult.databaseSaveSuccess(userService.getDepartmentUser());
}
@GetMapping("/notice")
@PreAuthorize("hasAuthority('notice:manage:get')")
@Operation(summary = "获取拥有发布公告权限的用户")
public ResponseResult<List<User>> getNoticeUser() {
return ResponseResult.databaseSaveSuccess(userService.getNoticeUser());
}
@GetMapping
@PreAuthorize("hasAuthority('system:user:get')")
@Operation(summary = "获取所有用户(权限管理相关)")

View File

@@ -25,6 +25,8 @@ public interface UserMapper extends BaseMapper<User> {
List<User> getAllDepartmentUser(@Param("departmentId")long departmentId);
List<User> getAllNoticeUser();
User getOneById(@Param("id") long id);
User getOneWithPowerByUsername(@Param("username") String username);

View File

@@ -22,6 +22,8 @@ public interface IUserService extends IService<User> {
List<User> getDepartmentUser();
List<User> getNoticeUser();
IPage<User> getAllUser(Long currentPage, Long pageSize, String searchName, List<Long> searchRole, List<Long> searchGroup, Integer searchEnable);
User getUser(long id);

View File

@@ -89,6 +89,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
return userMapper.getAllDepartmentUser(departmentId);
}
@Override
public List<User> getNoticeUser() {
return userMapper.getAllNoticeUser();
}
@Override
public IPage<User> getAllUser(Long currentPage, Long pageSize, String searchName, List<Long> searchRole, List<Long> searchGroup, Integer searchEnable) {
IPage<User> userIPage = PageDTO.of(currentPage, pageSize);