| | |
| | | |
| | | public boolean addMission(IpVolumeMissionParam missionparam) { |
| | | |
| | | List<Integer> fileIds = missionparam.getFileIds(); |
| | | List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.listByIds(fileIds); |
| | | ipVolumeFiles.forEach(file -> { |
| | | if (SecurityUtils.getClientId() != null) { |
| | | //非超管用户 |
| | | if (!SecurityUtils.getUserId().equals(file.getClientId()) && !SecurityUtils.getUserId().equals(file.getUserId())) { |
| | | //用户id和客户id都不匹配 |
| | | throw new BusinessException("文件归属异常,创建任务失败"); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | String taskName = missionparam.getMissionName(); |
| | | |
| | | if (null == taskName || "".equals(taskName)) { |
| | |
| | | MinIoConstant.BROADCAST_FILE.getBucketName() + fileEntity.getUserId(), |
| | | fileEntity.getFileName() |
| | | ); |
| | | if (fileEntity.getUserId() == null && fileEntity.getClientId() == null) { |
| | | if (fileEntity.getUserId() == null && fileEntity.getClientId() != null) { |
| | | absolutePath = MinIoConstant.getAbsolutePath( |
| | | MinIoConstant.ADMIN_BROADCAST_FILE.getBucketName(), |
| | | fileEntity.getFileName() |
| | |
| | | } |
| | | |
| | | } else { |
| | | if (!byId.getClientId().equals(SecurityUtils.getUserId())&&!byId.getUserId().equals(SecurityUtils.getUserId())) { |
| | | if (!byId.getClientId().equals(SecurityUtils.getUserId()) && !byId.getUserId().equals(SecurityUtils.getUserId())) { |
| | | throw new BusinessException("任务归属错误"); |
| | | } |
| | | } |