From afafd548b795b479409d270f2936827b38375f6c Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 14 八月 2026 16:56:15 +0800
Subject: [PATCH] 【丽水】uploadShow 调整,无法上传
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
index c75b794..507adde 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -155,8 +155,10 @@
filePath = filePath + "/show/" + file.getOriginalFilename().split("\\.", 2)[0];
// 涓婁紶骞惰繑鍥炴柊鏂囦欢鍚嶇О
String fileName = FileUploadUtils.uploadSort(filePath, file);
- //灏唚ord杞垚html
- convertDocToHtml(filePath + "\\" + file.getOriginalFilename(), filePath + "\\" + file.getOriginalFilename().split("\\.", 2)[0] + ".html");
+ // 灏唚ord杞垚html锛堟簮鏂囦欢浠ョ鐩樺疄闄呬繚瀛樿矾寰勪负鍑嗭紝淇濇寔鍒嗛殧绗︿竴鑷达紝閬垮厤"/"鍜�"\"娣风敤瀵艰嚧鎵句笉鍒版枃浠讹級
+ String docFilePath = RuoYiConfig.getProfile() + fileName.replace(Constants.RESOURCE_PREFIX, "");
+ String htmlFilePath = docFilePath.replaceAll("\\.[^.]*$", ".html");
+ convertDocToHtml(docFilePath, htmlFilePath);
String url = null;
SysConfig config = new SysConfig();
@@ -387,14 +389,16 @@
*/
@ApiOperation("鍒犻櫎RedisCache")
@PostMapping("/deleteRedisCache")
- public String deleteRedisCache(@RequestBody String key) {
- String object = redisCache.getCacheObject(key);
- if(StringUtils.isNotEmpty(object)) {
- redisCache.deleteObject(key);
- return "鍒犻櫎RedisCache" + key + "鎴愬姛锛�";
- }else {
- return "鍒犻櫎RedisCache" + key + "澶辫触,鏈壘鍒板搴攃ache";
+ public Set<String> deleteRedisCache(@RequestBody String key) {
+ Set<String> allKeys = redisCache.getAllKeys();
+ Set<String> matchKeys = new HashSet<>();
+ for (String redisKey : allKeys) {
+ if(redisKey.contains(key)) {
+ redisCache.deleteObject(redisKey);
+ matchKeys.add(redisKey);
+ }
}
+ return matchKeys;
}
}
--
Gitblit v1.9.3