2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-05-27 ffb8b05b06cbe324d9f8c1c4d8918661fd2cc675
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java
@@ -21,6 +21,8 @@
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
 * @Author liuhaonan
 * @Date 2021/12/16 10:48
@@ -80,7 +82,7 @@
        /**
         * 音柱文件删除 日志记录开始
         */
        String content = "删除文件id:"+fileId+"音柱文件名称:" + byId.getFileName() + ",文件大小:" + byId.getOriginSize() + ",文件路径:" + byId.getFileUrl();
        String content = "删除文件id:" + fileId + "音柱文件名称:" + byId.getFileName() + ",文件大小:" + byId.getOriginSize() + ",文件路径:" + byId.getFileUrl();
        StoreOperationRecordsUtils.storeOperationData(null, null, "音柱文件删除", content);
        /**
         * 音柱文件删除 日志记录结束
@@ -105,6 +107,19 @@
            wrapper.like(IpVolumeFile::getFileName, keyword);
        }
        return wrapper;
    }
    public List<IpVolumeFile> listFiles() {
        LambdaQueryWrapper<IpVolumeFile> wrapper = Wrappers.lambdaQuery(IpVolumeFile.class);
        //不是超管
        if (SecurityUtils.getClientId() != null) {
            wrapper = wrapper.eq(IpVolumeFile::getClientId, SecurityUtils.getUserId())
                    .or(file -> {
                        file.eq(IpVolumeFile::getUserId, SecurityUtils.getUserId());
                    });
        }
        return list(wrapper);
    }
@@ -150,7 +165,7 @@
        /**
         * 音柱文件上传 日志记录开始
         */
        String content = "文件内容:"+ JSON.toJSONString(fileUploadDto);
        String content = "文件内容:" + JSON.toJSONString(fileUploadDto);
        StoreOperationRecordsUtils.storeOperationData(null, null, "音柱文件上传", content);
        /**
         * 音柱文件上传 日志记录结束