2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-27 8a74d51dafd928a038dfeae9872b513ce8f62ad6
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/IpVolumeFileController.java
@@ -56,15 +56,26 @@
    }
    @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())) {