From 6a8deaf61aac6bd1f72af901a073b12cb0ff6b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 18 Aug 2021 14:13:46 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20minio=20?= =?UTF-8?q?=E6=97=A0=20perfix=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java index 9edb421a0..1a0e91ad3 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java @@ -99,7 +99,7 @@ public class MinioCloudStorageStrategy extends AbstractCloudStorageStrategy { @Override public UploadResult uploadSuffix(InputStream inputStream, String suffix, String contentType) { - return upload(inputStream, getPath("", suffix), contentType); + return upload(inputStream, getPath(properties.getPrefix(), suffix), contentType); } @Override From cf4b49ca3b259fb61585b39ae0ab014b767d90fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 18 Aug 2021 14:49:31 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Editor/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index bc2e7e1dd..e39511091 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -176,7 +176,7 @@ export default { // 获取光标所在位置 let length = quill.getSelection().index; // 插入图片 res.url为服务器返回的图片地址 - quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.data.fileName); + quill.insertEmbed(length, "image", res.data.url); // 调整光标到最后 quill.setSelection(length + 1); } else { From 96c4c4da56c31acbcd7336dfacd1971f5c181f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 18 Aug 2021 16:53:56 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E6=96=B0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E8=AF=B4=E6=98=8E=20=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/index.vue | 88 ++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 23c0e0598..1cbf7fe48 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -95,50 +95,50 @@
    -
  1. add [重大更新]重写 OSS 模块相关实现 支持动态配置(页面配置)
  2. -
  3. add [重大更新]增加 jackson 超出 JS 最大数值自动转字符串(雪花id序列化)处理
  4. -
  5. add [重大更新]重写 防重提交拦截器 支持全局与注解自定义 拦截时间配置配置 优化逻辑
  6. -
  7. add [重大更新]新增是否开启用户注册功能
  8. -
  9. add [重大更新]增加 easyexcel 工具类
  10. -
  11. add [重大更新]集成 性能分析插件 p6spy 更强劲的 SQL 分析
  12. -
  13. add [重大更新]增加 完整国际化解决方案
  14. -
  15. add [重大更新]支持自定义注解实现接口限流
  16. -
  17. update feign-okhttp 11.0 => 11.2
  18. -
  19. update okhttp 3.19.4 => 4.9.1
  20. -
  21. update minio 8.2.0 => 8.3.0
  22. -
  23. update hutool 5.7.6 => 5.7.7
  24. -
  25. update element-ui 2.15.2 => 2.15.5
  26. -
  27. update springboot admin 2.4.3 => 2.5.0 (新增 Quartz 专属监控页)
  28. -
  29. add 增加 admin 监控客户端开关
  30. -
  31. add 增加 国际化演示demo
  32. -
  33. update 更新软件架构图
  34. -
  35. update 优化XSS跨站脚本过滤
  36. -
  37. update 优化BLOB下载时清除URL对象引用
  38. -
  39. update 更新 防重提交拦截器 demo演示案例
  40. -
  41. update 日常字符串校验 统一重构到 StringUtils 便于维护扩展
  42. -
  43. update 修改 自动注入器 用户未登录异常拦截抛出警告 返回Null
  44. -
  45. update 重构 统一使用 流工具下载
  46. -
  47. update 重写 所有业务导出 适配easyexcel工具
  48. -
  49. update 移动文件存储业务到 system 模块
  50. -
  51. update 代码生成模板 适配新excel导出
  52. -
  53. update 将 Actuator 配置 移动到全局配置
  54. -
  55. update 统一镜像时区配置 移除主机时间映射
  56. -
  57. update 更改多数据源框架更清晰的依赖名
  58. -
  59. update 更新 阿里云 maven源 新地址
  60. -
  61. update 补全基础实体 文档注解
  62. -
  63. update 代码生成文档注解 增加必填判断配置
  64. -
  65. update 注入器 insert 增加 update 字段处理
  66. -
  67. update 默认首页使用keep-alive缓存
  68. -
  69. fix 生产minio回显问题
  70. -
  71. fix 修复角色分配用户页面接收参数与传递参数类型不一致导致的错误
  72. -
  73. fix 修复代码生成 删除按钮报错 loading 不取消问题
  74. -
  75. fix 解决登录后浏览器后台Breadcrumb组件报错
  76. -
  77. fix 修复DictUtils方法报错
  78. -
  79. fix 头像上传 未走OSS存储问题
  80. -
  81. fix oss列表 jpeg 不回显问题
  82. -
  83. fix 修复操作日志根据状态查询异常问题
  84. -
  85. remove 移除原生excel工具
  86. -
  87. remove 移除通用上传下载接口与配置
  88. +
  89. add [重大更新]重写 OSS 模块相关实现 支持动态配置(页面配置)
  90. +
  91. add [重大更新]增加 jackson 超出 JS 最大数值自动转字符串(雪花id序列化)处理
  92. +
  93. add [重大更新]重写 防重提交拦截器 支持全局与注解自定义 拦截时间配置配置 优化逻辑
  94. +
  95. add [重大更新]新增是否开启用户注册功能
  96. +
  97. add [重大更新]增加 easyexcel 工具类
  98. +
  99. add [重大更新]集成 性能分析插件 p6spy 更强劲的 SQL 分析
  100. +
  101. add [重大更新]增加 完整国际化解决方案
  102. +
  103. add [重大更新]支持自定义注解实现接口限流
  104. +
  105. update feign-okhttp 11.0 => 11.2
  106. +
  107. update okhttp 3.19.4 => 4.9.1
  108. +
  109. update minio 8.2.0 => 8.3.0
  110. +
  111. update hutool 5.7.6 => 5.7.7
  112. +
  113. update element-ui 2.15.2 => 2.15.5
  114. +
  115. update springboot admin 2.4.3 => 2.5.0 (新增 Quartz 专属监控页)
  116. +
  117. add 增加 admin 监控客户端开关
  118. +
  119. add 增加 国际化演示demo
  120. +
  121. update 更新软件架构图
  122. +
  123. update 优化XSS跨站脚本过滤
  124. +
  125. update 优化BLOB下载时清除URL对象引用
  126. +
  127. update 更新 防重提交拦截器 demo演示案例
  128. +
  129. update 日常字符串校验 统一重构到 StringUtils 便于维护扩展
  130. +
  131. update 修改 自动注入器 用户未登录异常拦截抛出警告 返回Null
  132. +
  133. update 重构 统一使用 流工具下载
  134. +
  135. update 重写 所有业务导出 适配easyexcel工具
  136. +
  137. update 移动文件存储业务到 system 模块
  138. +
  139. update 代码生成模板 适配新excel导出
  140. +
  141. update 将 Actuator 配置 移动到全局配置
  142. +
  143. update 统一镜像时区配置 移除主机时间映射
  144. +
  145. update 更改多数据源框架更清晰的依赖名
  146. +
  147. update 更新 阿里云 maven源 新地址
  148. +
  149. update 补全基础实体 文档注解
  150. +
  151. update 代码生成文档注解 增加必填判断配置
  152. +
  153. update 注入器 insert 增加 update 字段处理
  154. +
  155. update 默认首页使用keep-alive缓存
  156. +
  157. fix 生产minio回显问题
  158. +
  159. fix 修复角色分配用户页面接收参数与传递参数类型不一致导致的错误
  160. +
  161. fix 修复代码生成 删除按钮报错 loading 不取消问题
  162. +
  163. fix 解决登录后浏览器后台Breadcrumb组件报错
  164. +
  165. fix 修复DictUtils方法报错
  166. +
  167. fix 头像上传 未走OSS存储问题
  168. +
  169. fix oss列表 jpeg 不回显问题
  170. +
  171. fix 修复操作日志根据状态查询异常问题
  172. +
  173. remove 移除原生excel工具
  174. +
  175. remove 移除通用上传下载接口与配置
From a33a91916900c7bf6f74aac2a7a04118a8939b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 18 Aug 2021 18:24:05 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20OSS=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=B8=85=E7=A9=BA=E8=A2=AB=E8=BF=87=E6=BB=A4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/service/impl/SysOssConfigServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java index 5a6e8de55..a67abe541 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java @@ -88,7 +88,12 @@ public class SysOssConfigServiceImpl extends ServicePlusImpl luw = new LambdaUpdateWrapper<>(); + luw.set(StringUtils.isBlank(config.getPrefix()), SysOssConfig::getPrefix, ""); + luw.set(StringUtils.isBlank(config.getRegion()), SysOssConfig::getRegion, ""); + luw.set(StringUtils.isBlank(config.getExt1()), SysOssConfig::getExt1, ""); + luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId()); + return setConfigCache(update(config, luw), config); } /** From c91d33e4ab58bdee9d4328adc2248495cc656c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 18 Aug 2021 19:14:26 +0800 Subject: [PATCH 5/7] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20OSS=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=8E=E4=B8=8A=E4=BC=A0=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=20=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/oss/factory/OssFactory.java | 4 ++- .../AbstractCloudStorageStrategy.java | 2 ++ .../impl/AliyunCloudStorageStrategy.java | 7 ++-- .../impl/MinioCloudStorageStrategy.java | 7 ++-- .../impl/QcloudCloudStorageStrategy.java | 7 ++-- .../impl/QiniuCloudStorageStrategy.java | 11 ++++--- ruoyi-ui/src/components/Editor/index.vue | 2 +- ruoyi-ui/src/components/FileUpload/index.vue | 17 ++++++---- ruoyi-ui/src/components/ImageUpload/index.vue | 32 +++++++++++-------- ruoyi-ui/src/views/system/oss/config.vue | 2 +- 10 files changed, 55 insertions(+), 36 deletions(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java index 129068561..accbbcd4a 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java @@ -11,6 +11,7 @@ import com.ruoyi.oss.enumd.CloudServiceEnumd; import com.ruoyi.oss.exception.OssException; import com.ruoyi.oss.properties.CloudStorageProperties; import com.ruoyi.oss.service.ICloudStorageStrategy; +import com.ruoyi.oss.service.abstractd.AbstractCloudStorageStrategy; import java.util.Date; import java.util.Map; @@ -68,7 +69,8 @@ public class OssFactory { return service; } // 获取redis配置信息 创建对象 并缓存 - service = (ICloudStorageStrategy) ReflectUtils.newInstance(CloudServiceEnumd.getServiceClass(type), properties); + service = (ICloudStorageStrategy) ReflectUtils.newInstance(CloudServiceEnumd.getServiceClass(type)); + ((AbstractCloudStorageStrategy)service).init(properties); SERVICES.put(type, service); SERVICES_UPDATE_TIME.put(type, nowDate); return service; diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractCloudStorageStrategy.java index ec4dc3742..fec876d4e 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractCloudStorageStrategy.java @@ -20,6 +20,8 @@ public abstract class AbstractCloudStorageStrategy implements ICloudStorageStrat protected CloudStorageProperties properties; + public abstract void init(CloudStorageProperties properties); + @Override public abstract void createBucket(); diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/AliyunCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/AliyunCloudStorageStrategy.java index 11c3476de..c019d0138 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/AliyunCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/AliyunCloudStorageStrategy.java @@ -24,9 +24,10 @@ import java.io.InputStream; */ public class AliyunCloudStorageStrategy extends AbstractCloudStorageStrategy { - private final OSSClient client; + private OSSClient client; - public AliyunCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) { + @Override + public void init(CloudStorageProperties cloudStorageProperties) { properties = cloudStorageProperties; try { ClientConfiguration configuration = new ClientConfiguration(); @@ -35,7 +36,7 @@ public class AliyunCloudStorageStrategy extends AbstractCloudStorageStrategy { client = new OSSClient(properties.getEndpoint(), credentialProvider, configuration); createBucket(); } catch (Exception e) { - throw new IllegalArgumentException("阿里云存储配置错误! 请检查系统配置!"); + throw new OssException("阿里云存储配置错误! 请检查系统配置!"); } } diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java index 1a0e91ad3..f87dd0b1c 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/MinioCloudStorageStrategy.java @@ -20,9 +20,10 @@ import java.io.InputStream; */ public class MinioCloudStorageStrategy extends AbstractCloudStorageStrategy { - private final MinioClient minioClient; + private MinioClient minioClient; - public MinioCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) { + @Override + public void init(CloudStorageProperties cloudStorageProperties) { properties = cloudStorageProperties; try { minioClient = MinioClient.builder() @@ -31,7 +32,7 @@ public class MinioCloudStorageStrategy extends AbstractCloudStorageStrategy { .build(); createBucket(); } catch (Exception e) { - throw new IllegalArgumentException("Minio存储配置错误! 请检查系统配置!"); + throw new OssException("Minio存储配置错误! 请检查系统配置!"); } } diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java index c30dcbda8..7b7ae63be 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java @@ -24,9 +24,10 @@ import java.io.InputStream; */ public class QcloudCloudStorageStrategy extends AbstractCloudStorageStrategy { - private final COSClient client; + private COSClient client; - public QcloudCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) { + @Override + public void init(CloudStorageProperties cloudStorageProperties) { properties = cloudStorageProperties; try { COSCredentials credentials = new BasicCOSCredentials( @@ -43,7 +44,7 @@ public class QcloudCloudStorageStrategy extends AbstractCloudStorageStrategy { client = new COSClient(credentials, clientConfig); createBucket(); } catch (Exception e) { - throw new IllegalArgumentException("腾讯云存储配置错误! 请检查系统配置!"); + throw new OssException("腾讯云存储配置错误! 请检查系统配置!"); } } diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QiniuCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QiniuCloudStorageStrategy.java index ef2251334..c70e6eda1 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QiniuCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QiniuCloudStorageStrategy.java @@ -22,11 +22,12 @@ import java.io.InputStream; */ public class QiniuCloudStorageStrategy extends AbstractCloudStorageStrategy { - private final UploadManager uploadManager; - private final BucketManager bucketManager; - private final String token; + private UploadManager uploadManager; + private BucketManager bucketManager; + private String token; - public QiniuCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) { + @Override + public void init(CloudStorageProperties cloudStorageProperties) { properties = cloudStorageProperties; try { Configuration config = new Configuration(getRegion(properties.getRegion())); @@ -43,7 +44,7 @@ public class QiniuCloudStorageStrategy extends AbstractCloudStorageStrategy { bucketManager.createBucket(bucketName, properties.getRegion()); } } catch (Exception e) { - throw new IllegalArgumentException("七牛云存储配置错误! 请检查系统配置!"); + throw new OssException("七牛云存储配置错误! 请检查系统配置!"); } } diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index e39511091..1f2e15ec2 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -180,7 +180,7 @@ export default { // 调整光标到最后 quill.setSelection(length + 1); } else { - this.$message.error("图片插入失败"); + this.$message.error(res.msg); } }, handleUploadError() { diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue index 244ac2891..d5c3bc700 100644 --- a/ruoyi-ui/src/components/FileUpload/index.vue +++ b/ruoyi-ui/src/components/FileUpload/index.vue @@ -146,9 +146,14 @@ export default { }, // 上传成功回调 handleUploadSuccess(res, file) { - this.$message.success("上传成功"); - this.fileList.push({ name: res.data.fileName, url: res.data.fileName }); - this.$emit("input", this.listToString(this.fileList)); + if (res.code === 200) { + this.$message.success("上传成功"); + this.fileList.push({ name: res.data.fileName, url: res.data.fileName }); + this.$emit("input", this.listToString(this.fileList)); + } else { + this.$message.error(res.msg); + this.loading.close(); + } }, // 删除文件 handleDelete(index) { @@ -170,9 +175,9 @@ export default { for (let i in list) { strs += list[i].url + separator; } - return strs != '' ? strs.substr(0, strs.length - 1) : ''; - } - } + return strs != "" ? strs.substr(0, strs.length - 1) : ""; + }, + }, }; diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index e074b381b..ba088b93a 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -118,9 +118,14 @@ export default { }, // 上传成功回调 handleUploadSuccess(res) { - this.fileList.push({ name: res.data.fileName, url: res.data.url }); - this.$emit("input", this.listToString(this.fileList)); - this.loading.close(); + if (res.code == 200) { + this.fileList.push({ name: res.data.fileName, url: res.data.url }); + this.$emit("input", this.listToString(this.fileList)); + this.loading.close(); + } else { + this.$message.error(res.msg); + this.loading.close(); + } }, // 上传前loading加载 handleBeforeUpload(file) { @@ -130,7 +135,7 @@ export default { if (file.name.lastIndexOf(".") > -1) { fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1); } - isImg = this.fileType.some(type => { + isImg = this.fileType.some((type) => { if (file.type.indexOf(type) > -1) return true; if (fileExtension && fileExtension.indexOf(type) > -1) return true; return false; @@ -163,7 +168,7 @@ export default { this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`); }, // 上传失败 - handleUploadError() { + handleUploadError(res) { this.$message({ type: "error", message: "上传失败", @@ -182,25 +187,26 @@ export default { for (let i in list) { strs += list[i].url + separator; } - return strs != '' ? strs.substr(0, strs.length - 1) : ''; - } - } + return strs != "" ? strs.substr(0, strs.length - 1) : ""; + }, + }, }; diff --git a/ruoyi-ui/src/views/system/oss/config.vue b/ruoyi-ui/src/views/system/oss/config.vue index c6ea3a62e..28bdbe5b7 100644 --- a/ruoyi-ui/src/views/system/oss/config.vue +++ b/ruoyi-ui/src/views/system/oss/config.vue @@ -138,7 +138,7 @@ - + From d48c57917cfe976c5138c100f1703b0f3073626d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 20 Aug 2021 17:00:57 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20excel=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=B8=8E=20class=20=E6=9C=AA=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index f242d8cb1..e5d385f2d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -29,7 +29,7 @@ public class ExcelUtil { * @return 转换后集合 */ public static List importExcel(InputStream is, Class clazz) { - return EasyExcel.read(is).autoCloseStream(false).sheet().doReadSync(); + return EasyExcel.read(is).head(clazz).autoCloseStream(false).sheet().doReadSync(); } /** From 94be46d065691d45d95527d748d85d5496af6b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sun, 22 Aug 2021 12:47:51 +0000 Subject: [PATCH 7/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E5=99=A8=E5=B7=A5=E5=85=B7=E7=BC=96=E5=86=99=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/quartz/util/JobInvokeUtil.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java index ba55d2d10..40a19bdea 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java @@ -1,13 +1,12 @@ package com.ruoyi.quartz.util; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.quartz.domain.SysJob; - import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.LinkedList; import java.util.List; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.spring.SpringUtils; +import com.ruoyi.quartz.domain.SysJob; /** * 任务执行工具 @@ -65,7 +64,7 @@ public class JobInvokeUtil /** * 校验是否为为class包名 - * + * * @param str 名称 * @return true是 false否 */ @@ -76,31 +75,31 @@ public class JobInvokeUtil /** * 获取bean名称 - * + * * @param invokeTarget 目标字符串 * @return bean名称 */ public static String getBeanName(String invokeTarget) { String beanName = StringUtils.substringBefore(invokeTarget, "("); - return StringUtils.substringBefore(beanName, "."); + return StringUtils.substringBeforeLast(beanName, "."); } /** * 获取bean方法 - * + * * @param invokeTarget 目标字符串 * @return method方法 */ public static String getMethodName(String invokeTarget) { String methodName = StringUtils.substringBefore(invokeTarget, "("); - return StringUtils.substringBefore(methodName, "."); + return StringUtils.substringAfterLast(methodName, "."); } /** * 获取method方法参数相关列表 - * + * * @param invokeTarget 目标字符串 * @return method方法相关参数列表 */ @@ -147,7 +146,7 @@ public class JobInvokeUtil /** * 获取参数类型 - * + * * @param methodParams 参数相关列表 * @return 参数类型列表 */ @@ -165,7 +164,7 @@ public class JobInvokeUtil /** * 获取参数值 - * + * * @param methodParams 参数相关列表 * @return 参数值列表 */