2021与蓝度共同重构项目,服务端
liuhaonan
2022-09-27 0f9ee3de2c058b934cb6e495f9120f7764983e1f
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PlatformFileService.java
@@ -93,13 +93,15 @@
        if (platformFiles == null && platformFiles.size() == 0) {
            throw new BusinessException("未找到文件!");
        }
        //删除关系
        boolean remove = platformFileUserService.remove(Wrappers.lambdaQuery(PlatformFileUser.class).in(PlatformFileUser::getFileId, param.getFileIds()));
        if (remove) {
            //删除文件
            return removeByIds(param.getFileIds());
        //获取关系
        List<PlatformFileUser> list = platformFileUserService.list(Wrappers.lambdaQuery(PlatformFileUser.class).in(PlatformFileUser::getFileId, param.getFileIds()));
        if (!list.isEmpty()) {
            //删除关系
            platformFileUserService.remove(Wrappers.lambdaQuery(PlatformFileUser.class).in(PlatformFileUser::getFileId, param.getFileIds()));
        }
        return false;
        //删除文件
        return removeByIds(param.getFileIds());
    }