| | |
| | | Path dir = resolveAvatarUploadDir(); |
| | | String fileName = UUID.randomUUID().toString().replace("-", "") + ext; |
| | | Path target = dir.resolve(fileName); |
| | | try { |
| | | try (InputStream in = file.getInputStream()) { |
| | | Files.createDirectories(dir); |
| | | Files.copy(file.getInputStream(), target, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.copy(in, target, StandardCopyOption.REPLACE_EXISTING); |
| | | } catch (IOException ex) { |
| | | throw new BizException(BizErrorCode.AUTH_FORBIDDEN, "头像上传失败"); |
| | | } |
| | |
| | | q.notIn(MpUser::getId, inGroup); |
| | | } |
| | | } |
| | | q.orderByDesc(MpUser::getCreateTime); |
| | | q.orderByAsc(MpUser::getNickName).orderByAsc(MpUser::getId); |
| | | Page<MpUser> p = mpUserMapper.selectPage(new Page<>(page, size), q); |
| | | Set<Long> deptIds = new HashSet<>(); |
| | | Set<Long> userIds = new HashSet<>(); |