| | |
| | | } |
| | | |
| | | @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())) { |