| | |
| | | } |
| | | |
| | | @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 = "orderBy", required = false) String orderBy) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_FILE_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | LambdaQueryWrapper<IpVolumeFile> wrapper = ipVolumeFileService.listFile(baseConditionVO, keyword); |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | |
| | | if (orderBy.isEmpty() || orderBy == null) { |
| | | orderBy = "id desc"; |
| | | } |
| | | if ("createTime-1".equals(orderBy)) { |
| | | orderBy = "create_time asc"; |
| | | } else if ("createTime-2".equals(orderBy)) { |
| | | orderBy = "create_time desc"; |
| | | } |
| | | LambdaQueryWrapper<IpVolumeFile> wrapper = ipVolumeFileService.listFile(baseConditionVO, keyword, orderBy); |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | return ResponseUtil.success(ipVolumeFileService.list(wrapper)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/IpVolumeFileUploading") |
| | | public ResponseVO<Object> uploadingFile(@RequestParam("file") MultipartFile file) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_FILE_UPLOADING.getCode())) { |
| | |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> listMission(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> listMission(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword |
| | | , @RequestParam(value = "orderBy", required = false) String orderBy) { |
| | | if (!permissionConfig.check(MenuEnum.IP_BROADCAST_TASK_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | |
| | | return ResponseUtil.successPage(ipVolumeMissionService.missionList(baseConditionVO, keyword)); |
| | | return ResponseUtil.successPage(ipVolumeMissionService.missionList(baseConditionVO, keyword,orderBy)); |
| | | } |
| | | |
| | | //获取任务详情 |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.file.FileUploadDto; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | |
| | | return removeById(fileId); |
| | | } |
| | | |
| | | public LambdaQueryWrapper<IpVolumeFile> listFile(BaseConditionVO baseConditionVO, String keyword) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | public LambdaQueryWrapper<IpVolumeFile> listFile(BaseConditionVO baseConditionVO, String keyword, String orderBy) { |
| | | if (orderBy.isEmpty() || orderBy == null) { |
| | | orderBy = "id desc"; |
| | | } |
| | | if ("createTime-1".equals(orderBy)) { |
| | | orderBy = "create_time asc"; |
| | | } else if ("createTime-2".equals(orderBy)) { |
| | | orderBy = "create_time desc"; |
| | | } |
| | | LambdaQueryWrapper<IpVolumeFile> wrapper = Wrappers.lambdaQuery(IpVolumeFile.class); |
| | | |
| | | //不是超管 |
| | |
| | | } |
| | | |
| | | |
| | | public List<IpVolumeMissionBo> missionList(BaseConditionVO baseConditionVO, String keyword) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | public List<IpVolumeMissionBo> missionList(BaseConditionVO baseConditionVO, String keyword, String orderBy) { |
| | | if (orderBy.isEmpty() || orderBy == null) { |
| | | orderBy = "id desc"; |
| | | } |
| | | |
| | | if ("createTime-1".equals(orderBy)) { |
| | | orderBy = "create_time asc"; |
| | | } else if ("createTime-2".equals(orderBy)) { |
| | | orderBy = "create_time desc"; |
| | | } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | |
| | | List<IpVolumeMissionBo> ipVolumeMissionBos = new ArrayList<>(); |
| | | LambdaQueryWrapper<IpVolumeMission> eq = Wrappers.lambdaQuery(IpVolumeMission.class); |