From ffb8b05b06cbe324d9f8c1c4d8918661fd2cc675 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 27 五月 2022 11:33:49 +0800
Subject: [PATCH] 设备列表
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java
index eed7f5a..0d6a354 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeFileService.java
+++ b/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);
/**
* 闊虫煴鏂囦欢涓婁紶 鏃ュ織璁板綍缁撴潫
--
Gitblit v1.9.3