| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | |
| | | @ApiOperation("获取同行人") |
| | | @GetMapping("/peerList") |
| | | @Cacheable(value = "sysUser:peerList") |
| | | public AjaxResult peerList(String nickName, String deptId) |
| | | { |
| | | List<SysUser> list = userService.list(userService.lq() |
| | |
| | | .ne(SysUser::getUserName,"admin") |
| | | .ne(SysUser::getUserId, SecurityUtils.getUserId()) |
| | | .like(StringUtils.isNotEmpty(nickName), SysUser::getNickName,nickName) |
| | | .eq(deptId!=null, SysUser::getDeptId,deptId) |
| | | .eq(deptId!=null, SysUser::getDeptId, deptId) |
| | | ); |
| | | list.forEach(user->{ |
| | | SysDept sysDept = deptService.selectDeptById(user.getDeptId()); |