2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-05-27 b2cf36ae92e61534f9d2e02068bff0f5127272bc
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java
@@ -19,6 +19,7 @@
import com.sandu.ximon.dao.mapper.IpVolumeFileMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@@ -82,7 +83,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);
        /**
         * 音柱文件删除 日志记录结束
@@ -91,10 +92,8 @@
        return removeById(fileId);
    }
    public LambdaQueryWrapper<IpVolumeFile> listFile(BaseConditionVO baseConditionVO, String keyword) {
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
    public List<IpVolumeFile> ipVolumeFileList(BaseConditionVO baseConditionVO, String keyword, Integer order, Integer seq) {
        LambdaQueryWrapper<IpVolumeFile> wrapper = Wrappers.lambdaQuery(IpVolumeFile.class);
        //不是超管
        if (SecurityUtils.getClientId() != null) {
            wrapper = wrapper.eq(IpVolumeFile::getClientId, SecurityUtils.getUserId())
@@ -106,7 +105,38 @@
        if (keyword != null && !keyword.isEmpty()) {
            wrapper.like(IpVolumeFile::getFileName, keyword);
        }
        return wrapper;
        //排序字段
        String orderByResult = "create_time";
        //正序、倒叙
        String orderBySeq = "ASC";
        if (order != null) {
            switch (order) {
                case 1:
                    orderByResult = "create_time";
                    break;
                default:
            }
        }
        if (seq != null) {
            switch (seq) {
                case 1:
                    orderBySeq = " ASC";
                    break;
                case 2:
                    orderBySeq = " DESC";
                    break;
                default:
                    break;
            }
        }
        //排序方式
        String orderBy = orderByResult + " " + orderBySeq;
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy);
        List<IpVolumeFile> list = list(wrapper);
        return list;
    }
    public List<IpVolumeFile> listFiles() {
@@ -121,9 +151,6 @@
        }
        return list(wrapper);
    }
    /**
@@ -168,7 +195,7 @@
        /**
         * 音柱文件上传 日志记录开始
         */
        String content = "文件内容:"+ JSON.toJSONString(fileUploadDto);
        String content = "文件内容:" + JSON.toJSONString(fileUploadDto);
        StoreOperationRecordsUtils.storeOperationData(null, null, "音柱文件上传", content);
        /**
         * 音柱文件上传 日志记录结束