| | |
| | | |
| | | @PostMapping("/add") |
| | | public ResponseVO<Object> addFile(@RequestBody @Validated IpVolumeFileParam fileParam) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_FILE_ADD.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(ipVolumeFileService.addFile(fileParam)); |
| | | } |
| | | |
| | | @PostMapping("/delete/{fileId}") |
| | | public ResponseVO<Object> deleteFile(@PathVariable Long fileId) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_FILE_DELETE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | List<BroadcastV2TaskFile> list = v2TaskFileService.list(Wrappers.lambdaQuery(BroadcastV2TaskFile.class).eq(BroadcastV2TaskFile::getFileId, fileId)); |
| | | if (list.size() != 0) { |
| | | throw new BusinessException("此文件正在被其他任务占用"); |
| | |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "keyword", required = false) String keyword, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_FILE_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | LambdaQueryWrapper<IpVolumeFile> wrapper = ipVolumeFileService.listFile(baseConditionVO, keyword); |
| | | |
| | | List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.ipVolumeFileList(baseConditionVO, keyword, order, seq); |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | /* if (null != keyword) { |
| | | wrapper.like(IpVolumeFile::getFileName, keyword); |
| | | }*/ |
| | | |
| | | |
| | | |
| | | return ResponseUtil.success(ipVolumeFileService.list(wrapper)); |
| | | return ResponseUtil.success(ipVolumeFiles); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/IpVolumeFileUploading") |
| | | public ResponseVO<Object> uploadingFile(@RequestParam("file") MultipartFile file) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_FILE_UPLOADING.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(ipVolumeFileService.upload(file)); |
| | | } |
| | | } |