2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-04-18 25467e37012939fb621ee6e43edc2587ba48dc63
广播素材列表
已修改3个文件
41 ■■■■■ 文件已修改
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/IpVolumeFileController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/IpVolumeMissionController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/IpVolumeFileController.java
@@ -55,10 +55,15 @@
            return ResponseUtil.fail("缺少对应用户权限");
        }
        LambdaQueryWrapper<IpVolumeFile> wrapper = ipVolumeFileService.listFile(baseConditionVO, keyword);
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
      /*  if (null != keyword) {
            wrapper.like(IpVolumeFile::getFileName, keyword);
        }*/
        return ResponseUtil.success(ipVolumeFileService.list(wrapper));
    }
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/IpVolumeMissionController.java
@@ -96,15 +96,6 @@
            return ResponseUtil.fail("缺少对应用户权限");
        }
//        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());// todo
////        return ResponseUtil.successPage(ipVolumeMissionService.missionList(baseConditionVO,keyword));
//        if (SecurityUtils.getClientId() == null) {
//            LambdaQueryWrapper<IpVolumeMission> like = Wrappers.lambdaQuery(IpVolumeMission.class).like(IpVolumeMission::getMissionName, keyword);
//            return ResponseUtil.successPage(ipVolumeMissionService.list(like));
//        }
        return ResponseUtil.successPage(ipVolumeMissionService.missionList(baseConditionVO, keyword));
    }
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java
@@ -73,27 +73,20 @@
    public LambdaQueryWrapper<IpVolumeFile> listFile(BaseConditionVO baseConditionVO, String keyword) {
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
        LambdaQueryWrapper<IpVolumeFile> wrapper;
        LambdaQueryWrapper<IpVolumeFile> wrapper = Wrappers.lambdaQuery(IpVolumeFile.class);
        if (SecurityUtils.getClientId() == null) {
            wrapper = Wrappers.lambdaQuery(IpVolumeFile.class);
        } else {
            if (clientService.findClientId()) {
                wrapper = Wrappers.lambdaQuery(IpVolumeFile.class).eq(IpVolumeFile::getUserId, SecurityUtils.getUserId());
            } else {
                wrapper = Wrappers.lambdaQuery(IpVolumeFile.class).eq(IpVolumeFile::getClientId, clientService.getClientId())
                        .or(file -> {
                            file.eq(IpVolumeFile::getClientId, SecurityUtils.getUserId());
                        });
            }
        //不是超管
        if (SecurityUtils.getClientId() != null) {
            wrapper = wrapper.eq(IpVolumeFile::getClientId, SecurityUtils.getUserId())
                    .or(file -> {
                        file.eq(IpVolumeFile::getUserId, SecurityUtils.getUserId());
                    });
        }
        if (keyword.isEmpty()) {
            return wrapper;
        } else {
            return wrapper.like(IpVolumeFile::getFileName, keyword);
        if (!keyword.isEmpty()) {
            wrapper.like(IpVolumeFile::getFileName, keyword);
        }
        return wrapper;
    }