From 8c7507b048120703365f5447b026746d829324a7 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 01/88] =?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 UploadResult uploadSuffix(byte[] data, String suffix, String contentType) @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 9dd0ed43293faf18ba32661779a6f8fdfd41bec8 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 02/88] =?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 e981388aa7192738d5f7bacd5bce5c5810a1e634 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 03/88] =?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 8133c60ab38d47d6d317af089f6a4c27ef4b43ca Mon Sep 17 00:00:00 2001 From: aasdd Date: Wed, 18 Aug 2021 09:29:22 +0000 Subject: [PATCH 04/88] =?UTF-8?q?update=20=20ruoyi-ui/src/layout/index.vue?= =?UTF-8?q?.=20=E5=88=A0=E6=8E=89=E6=AD=A4=E5=A4=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=8F=B3=E8=BE=B9=E6=A0=8F=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E7=94=9F=E6=95=88=E3=80=82=E7=8E=B0=E5=9C=A8=E6=98=AF=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=8A=A8=E7=94=BB=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/index.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index c6e9b3bc9..64cec4315 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -8,7 +8,7 @@ - + @@ -39,7 +39,6 @@ export default { sideTheme: state => state.settings.sideTheme, sidebar: state => state.app.sidebar, device: state => state.app.device, - showSettings: state => state.settings.showSettings, needTagsView: state => state.settings.tagsView, fixedHeader: state => state.settings.fixedHeader }), From 88e3805ff917d791c76ff5ac50b6c4e65c70eca4 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 05/88] =?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 Boolean insertByBo(SysOssConfigBo bo) { public Boolean updateByBo(SysOssConfigBo bo) { SysOssConfig config = BeanUtil.toBean(bo, SysOssConfig.class); validEntityBeforeSave(config); - return setConfigCache(updateById(config), config); + LambdaUpdateWrapper 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 36fae5c926e2c52c0e1c5d92adfc15352e242ee9 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 06/88] =?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.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 static ICloudStorageStrategy instance(String type) { 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 @@ */ 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 AliyunCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) 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 @@ */ 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 MinioCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) .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 @@ */ 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 QcloudCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) 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 @@ */ 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 QiniuCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) 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 aead5602277e53ecff63cf3c69a11e2461b23164 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: Thu, 19 Aug 2021 11:13:59 +0800 Subject: [PATCH 07/88] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=9D=83=E9=99=90=E5=B7=A5=E5=85=B7=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysLoginController.java | 9 +-------- .../controller/system/SysProfileController.java | 17 ++++++++--------- .../controller/system/SysRoleController.java | 3 +-- .../controller/system/SysUserController.java | 9 +-------- .../framework/aspectj/DataScopeAspect.java | 6 ++---- .../com/ruoyi/framework/aspectj/LogAspect.java | 5 ++--- .../web/service/PermissionService.java | 14 +++++--------- 7 files changed, 20 insertions(+), 43 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index a223f0f3c..dab2bf879 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -12,12 +12,9 @@ import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginBody; -import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.framework.web.service.SysLoginService; import com.ruoyi.framework.web.service.SysPermissionService; -import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.service.ISysMenuService; /** @@ -37,9 +34,6 @@ public class SysLoginController @Autowired private SysPermissionService permissionService; - @Autowired - private TokenService tokenService; - /** * 登录方法 * @@ -65,8 +59,7 @@ public AjaxResult login(@RequestBody LoginBody loginBody) @GetMapping("getInfo") public AjaxResult getInfo() { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - SysUser user = loginUser.getUser(); + SysUser user = SecurityUtils.getLoginUser().getUser(); // 角色集合 Set roles = permissionService.getRolePermission(user); // 权限集合 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java index 899c60eb6..227ac872d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java @@ -19,7 +19,6 @@ import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.framework.web.service.TokenService; @@ -46,7 +45,7 @@ public class SysProfileController extends BaseController @GetMapping public AjaxResult profile() { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = getLoginUser(); SysUser user = loginUser.getUser(); AjaxResult ajax = AjaxResult.success(user); ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername())); @@ -71,17 +70,17 @@ public AjaxResult updateProfile(@RequestBody SysUser user) { return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = getLoginUser(); SysUser sysUser = loginUser.getUser(); user.setUserId(sysUser.getUserId()); user.setPassword(null); if (userService.updateUserProfile(user) > 0) { // 更新缓存用户信息 - loginUser.getUser().setNickName(user.getNickName()); - loginUser.getUser().setPhonenumber(user.getPhonenumber()); - loginUser.getUser().setEmail(user.getEmail()); - loginUser.getUser().setSex(user.getSex()); + sysUser.setNickName(user.getNickName()); + sysUser.setPhonenumber(user.getPhonenumber()); + sysUser.setEmail(user.getEmail()); + sysUser.setSex(user.getSex()); tokenService.setLoginUser(loginUser); return AjaxResult.success(); } @@ -95,7 +94,7 @@ public AjaxResult updateProfile(@RequestBody SysUser user) @PutMapping("/updatePwd") public AjaxResult updatePwd(String oldPassword, String newPassword) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = getLoginUser(); String userName = loginUser.getUsername(); String password = loginUser.getPassword(); if (!SecurityUtils.matchesPassword(oldPassword, password)) @@ -125,7 +124,7 @@ public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws { if (!file.isEmpty()) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = getLoginUser(); String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file); if (userService.updateUserAvatar(loginUser.getUsername(), avatar)) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java index 4680b67ef..2870f6678 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java @@ -21,7 +21,6 @@ import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.web.service.SysPermissionService; @@ -123,7 +122,7 @@ else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) if (roleService.updateRole(role) > 0) { // 更新缓存用户权限 - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = getLoginUser(); if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 047f2e942..e5469eca7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -21,14 +21,11 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysUserService; @@ -51,9 +48,6 @@ public class SysUserController extends BaseController @Autowired private ISysPostService postService; - @Autowired - private TokenService tokenService; - /** * 获取用户列表 */ @@ -83,8 +77,7 @@ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws E { ExcelUtil util = new ExcelUtil(SysUser.class); List userList = util.importExcel(file.getInputStream()); - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - String operName = loginUser.getUsername(); + String operName = getUsername(); String message = userService.importUser(userList, updateSupport, operName); return AjaxResult.success(message); } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index e9884302c..e4340d019 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -13,10 +13,8 @@ import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.framework.web.service.TokenService; +import com.ruoyi.common.utils.SecurityUtils; /** * 数据过滤处理 @@ -79,7 +77,7 @@ protected void handleDataScope(final JoinPoint joinPoint) return; } // 获取当前的用户 - LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = SecurityUtils.getLoginUser(); if (StringUtils.isNotNull(loginUser)) { SysUser currentUser = loginUser.getUser(); diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index 18500abe8..b7cf17bbe 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -27,10 +27,9 @@ import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.ip.IpUtils; -import com.ruoyi.common.utils.spring.SpringUtils; +import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.framework.manager.AsyncManager; import com.ruoyi.framework.manager.factory.AsyncFactory; -import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.domain.SysOperLog; /** @@ -85,7 +84,7 @@ protected void handleLog(final JoinPoint joinPoint, final Exception e, Object js } // 获取当前的用户 - LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = SecurityUtils.getLoginUser(); // *========数据库日志=========*// SysOperLog operLog = new SysOperLog(); diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java index 003c7942a..3881053b5 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java @@ -1,12 +1,11 @@ package com.ruoyi.framework.web.service; import java.util.Set; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; /** @@ -27,9 +26,6 @@ public class PermissionService private static final String PERMISSION_DELIMETER = ","; - @Autowired - private TokenService tokenService; - /** * 验证用户是否具备某权限 * @@ -42,7 +38,7 @@ public boolean hasPermi(String permission) { return false; } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = SecurityUtils.getLoginUser(); if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions())) { return false; @@ -73,7 +69,7 @@ public boolean hasAnyPermi(String permissions) { return false; } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = SecurityUtils.getLoginUser(); if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions())) { return false; @@ -101,7 +97,7 @@ public boolean hasRole(String role) { return false; } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = SecurityUtils.getLoginUser(); if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles())) { return false; @@ -140,7 +136,7 @@ public boolean hasAnyRoles(String roles) { return false; } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + LoginUser loginUser = SecurityUtils.getLoginUser(); if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles())) { return false; From 1e37f0430b93ec3f88f09870329db297b1d880ae Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 19 Aug 2021 15:26:22 +0800 Subject: [PATCH 08/88] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=B1=8F=E8=94=BDldap=E8=BF=9C=E7=A8=8B=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/constant/Constants.java | 7 ++++++- .../com/ruoyi/quartz/controller/SysJobController.java | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java index 7a57fc021..9f55771bf 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java @@ -68,7 +68,7 @@ public class Constants * 登录用户 redis key */ public static final String LOGIN_TOKEN_KEY = "login_tokens:"; - + /** * 防重提交 redis key */ @@ -143,4 +143,9 @@ public class Constants * RMI 远程方法调用 */ public static final String LOOKUP_RMI = "rmi://"; + + /** + * LDAP 远程方法调用 + */ + public static final String LOOKUP_LDAP = "ldap://"; } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java index 8ce529836..c9616c2f6 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java @@ -88,6 +88,10 @@ else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_ { return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi://'调用"); } + else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_LDAP)) + { + return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap://'调用"); + } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) { return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)//'调用"); @@ -112,6 +116,10 @@ else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_ { return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi://'调用"); } + else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_LDAP)) + { + return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap://'调用"); + } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) { return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)//'调用"); From 89a75e78009be9b813ce9a1ac8e94f0aa13dbf04 Mon Sep 17 00:00:00 2001 From: youjie <273666957@qq.com> Date: Thu, 19 Aug 2021 17:16:36 +0800 Subject: [PATCH 09/88] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96oss=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=94=99=E8=AF=AF=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oss/service/impl/AliyunCloudStorageStrategy.java | 8 ++++---- .../ruoyi/oss/service/impl/MinioCloudStorageStrategy.java | 6 +++--- .../oss/service/impl/QcloudCloudStorageStrategy.java | 8 ++++---- .../ruoyi/oss/service/impl/QiniuCloudStorageStrategy.java | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) 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 c019d0138..04ee67500 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 @@ -36,7 +36,7 @@ public void init(CloudStorageProperties cloudStorageProperties) { client = new OSSClient(properties.getEndpoint(), credentialProvider, configuration); createBucket(); } catch (Exception e) { - throw new OssException("阿里云存储配置错误! 请检查系统配置!"); + throw new OssException("阿里云存储配置错误! 请检查系统配置:[" + e.getMessage() + "]"); } } @@ -51,7 +51,7 @@ public void createBucket() { createBucketRequest.setCannedACL(CannedAccessControlList.PublicRead); client.createBucket(createBucketRequest); } catch (Exception e) { - throw new OssException("创建Bucket失败, 请核对阿里云配置信息"); + throw new OssException("创建Bucket失败, 请核对阿里云配置信息:[" + e.getMessage() + "]"); } } @@ -72,7 +72,7 @@ public UploadResult upload(InputStream inputStream, String path, String contentT metadata.setContentType(contentType); client.putObject(new PutObjectRequest(properties.getBucketName(), path, inputStream, metadata)); } catch (Exception e) { - throw new OssException("上传文件失败,请检查阿里云配置信息"); + throw new OssException("上传文件失败,请检查阿里云配置信息:[" + e.getMessage() + "]"); } return new UploadResult().setUrl(getEndpointLink() + "/" + path).setFilename(path); } @@ -83,7 +83,7 @@ public void delete(String path) { try { client.deleteObject(properties.getBucketName(), path); } catch (Exception e) { - throw new OssException("上传文件失败,请检查阿里云配置信息"); + throw new OssException("上传文件失败,请检查阿里云配置信息:[" + e.getMessage() + "]"); } } 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 f87dd0b1c..b25108dc7 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 @@ -32,7 +32,7 @@ public void init(CloudStorageProperties cloudStorageProperties) { .build(); createBucket(); } catch (Exception e) { - throw new OssException("Minio存储配置错误! 请检查系统配置!"); + throw new OssException("Minio存储配置错误! 请检查系统配置:[" + e.getMessage() + "]"); } } @@ -51,7 +51,7 @@ public void createBucket() { .config(getPolicy(bucketName, PolicyType.READ)) .build()); } catch (Exception e) { - throw new OssException("创建Bucket失败, 请核对Minio配置信息"); + throw new OssException("创建Bucket失败, 请核对Minio配置信息:[" + e.getMessage() + "]"); } } @@ -75,7 +75,7 @@ public UploadResult upload(InputStream inputStream, String path, String contentT .stream(inputStream, inputStream.available(), -1) .build()); } catch (Exception e) { - throw new OssException("上传文件失败,请核对Minio配置信息"); + throw new OssException("上传文件失败,请核对Minio配置信息:[" + e.getMessage() + "]"); } return new UploadResult().setUrl(getEndpointLink() + "/" + path).setFilename(path); } 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 7b7ae63be..9bd366e0d 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 @@ -44,7 +44,7 @@ public void init(CloudStorageProperties cloudStorageProperties) { client = new COSClient(credentials, clientConfig); createBucket(); } catch (Exception e) { - throw new OssException("腾讯云存储配置错误! 请检查系统配置!"); + throw new OssException("腾讯云存储配置错误! 请检查系统配置:[" + e.getMessage() + "]"); } } @@ -59,7 +59,7 @@ public void createBucket() { createBucketRequest.setCannedAcl(CannedAccessControlList.PublicRead); client.createBucket(createBucketRequest); } catch (Exception e) { - throw new OssException("创建Bucket失败, 请核对腾讯云配置信息"); + throw new OssException("创建Bucket失败, 请核对腾讯云配置信息:[" + e.getMessage() + "]"); } } @@ -80,7 +80,7 @@ public UploadResult upload(InputStream inputStream, String path, String contentT metadata.setContentType(contentType); client.putObject(new PutObjectRequest(properties.getBucketName(), path, inputStream, metadata)); } catch (Exception e) { - throw new OssException("上传文件失败,请检查腾讯云配置信息"); + throw new OssException("上传文件失败,请检查腾讯云配置信息:[" + e.getMessage() + "]"); } return new UploadResult().setUrl(getEndpointLink() + "/" + path).setFilename(path); } @@ -91,7 +91,7 @@ public void delete(String path) { try { client.deleteObject(new DeleteObjectRequest(properties.getBucketName(), path)); } catch (Exception e) { - throw new OssException("上传文件失败,请检腾讯云查配置信息"); + throw new OssException("上传文件失败,请检腾讯云查配置信息:[" + e.getMessage() + "]"); } } 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 c70e6eda1..e9b8dc096 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 @@ -44,7 +44,7 @@ public void init(CloudStorageProperties cloudStorageProperties) { bucketManager.createBucket(bucketName, properties.getRegion()); } } catch (Exception e) { - throw new OssException("七牛云存储配置错误! 请检查系统配置!"); + throw new OssException("七牛云存储配置错误! 请检查系统配置:[" + e.getMessage() + "]"); } } @@ -57,7 +57,7 @@ public void createBucket() { } bucketManager.createBucket(bucketName, properties.getRegion()); } catch (Exception e) { - throw new OssException("创建Bucket失败, 请核对七牛云配置信息"); + throw new OssException("创建Bucket失败, 请核对七牛云配置信息:[" + e.getMessage() + "]"); } } @@ -74,7 +74,7 @@ public UploadResult upload(byte[] data, String path, String contentType) { throw new RuntimeException("上传七牛出错:" + res.toString()); } } catch (Exception e) { - throw new OssException("上传文件失败,请核对七牛配置信息"); + throw new OssException("上传文件失败,请核对七牛配置信息:[" + e.getMessage() + "]"); } return new UploadResult().setUrl(getEndpointLink() + "/" + path).setFilename(path); } From c3b44e835d84121858c5c13cb438e5d095c0ba32 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: Thu, 19 Aug 2021 17:37:44 +0800 Subject: [PATCH 10/88] =?UTF-8?q?update=20=E5=90=8C=E6=AD=A5=20ruoyi=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/system/SysUserController.java | 1 - .../java/com/ruoyi/framework/aspectj/DataScopeAspect.java | 4 +--- .../main/java/com/ruoyi/framework/aspectj/LogAspect.java | 3 +-- .../com/ruoyi/framework/web/service/PermissionService.java | 6 ++---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 65a511869..20f63255f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -15,7 +15,6 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.domain.vo.SysUserExportVo; import com.ruoyi.system.domain.vo.SysUserImportVo; import com.ruoyi.system.service.ISysPostService; diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index 22200b227..a2c101e3d 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -5,11 +5,9 @@ import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; +import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.reflect.ReflectUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.framework.web.service.TokenService; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.Signature; import org.aspectj.lang.annotation.Aspect; diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index 6c5c9f145..e8c47a364 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -5,12 +5,11 @@ import com.ruoyi.common.enums.BusinessStatus; import com.ruoyi.common.enums.HttpMethod; import com.ruoyi.common.utils.JsonUtils; +import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.framework.web.service.AsyncService; -import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.domain.SysOperLog; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.Signature; diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java index cb10de0b8..080177f80 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java @@ -1,11 +1,9 @@ package com.ruoyi.framework.web.service; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; -import org.springframework.beans.factory.annotation.Autowired; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.common.utils.StringUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; From cb5ee9c8a16ba7aac6fe97c0463e12585dbd5647 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 20 Aug 2021 11:04:15 +0800 Subject: [PATCH 11/88] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A1=A8=E5=AD=97=E6=AE=B5=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/quartz.sql | 238 +++++++++++++++++++++++++------------------------ 1 file changed, 121 insertions(+), 117 deletions(-) diff --git a/sql/quartz.sql b/sql/quartz.sql index 52b6a0926..58106e125 100644 --- a/sql/quartz.sql +++ b/sql/quartz.sql @@ -1,170 +1,174 @@ +DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; +DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; +DROP TABLE IF EXISTS QRTZ_LOCKS; +DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; +DROP TABLE IF EXISTS QRTZ_CALENDARS; + -- ---------------------------- -- 1、存储每一个已配置的 jobDetail 的详细信息 -- ---------------------------- -drop table if exists QRTZ_JOB_DETAILS; create table QRTZ_JOB_DETAILS ( - sched_name varchar(120) not null, - job_name varchar(200) not null, - job_group varchar(200) not null, - description varchar(250) null, - job_class_name varchar(250) not null, - is_durable varchar(1) not null, - is_nonconcurrent varchar(1) not null, - is_update_data varchar(1) not null, - requests_recovery varchar(1) not null, - job_data blob null, - primary key (sched_name,job_name,job_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + job_name varchar(200) not null comment '任务名称', + job_group varchar(200) not null comment '任务组名', + description varchar(250) null comment '相关介绍', + job_class_name varchar(250) not null comment '执行任务类名称', + is_durable varchar(1) not null comment '是否持久化', + is_nonconcurrent varchar(1) not null comment '是否并发', + is_update_data varchar(1) not null comment '是否更新数据', + requests_recovery varchar(1) not null comment '是否接受恢复执行', + job_data blob null comment '存放持久化job对象', + primary key (sched_name, job_name, job_group) +) engine=innodb comment = '任务详细信息表'; -- ---------------------------- -- 2、 存储已配置的 Trigger 的信息 -- ---------------------------- -drop table if exists QRTZ_TRIGGERS; create table QRTZ_TRIGGERS ( - sched_name varchar(120) not null, - trigger_name varchar(200) not null, - trigger_group varchar(200) not null, - job_name varchar(200) not null, - job_group varchar(200) not null, - description varchar(250) null, - next_fire_time bigint(13) null, - prev_fire_time bigint(13) null, - priority integer null, - trigger_state varchar(16) not null, - trigger_type varchar(8) not null, - start_time bigint(13) not null, - end_time bigint(13) null, - calendar_name varchar(200) null, - misfire_instr smallint(2) null, - job_data blob null, - primary key (sched_name,trigger_name,trigger_group), - foreign key (sched_name,job_name,job_group) references QRTZ_JOB_DETAILS(sched_name,job_name,job_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment '触发器的名字', + trigger_group varchar(200) not null comment '触发器所属组的名字', + job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键', + job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键', + description varchar(250) null comment '相关介绍', + next_fire_time bigint(13) null comment '上一次触发时间(毫秒)', + prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)', + priority integer null comment '优先级', + trigger_state varchar(16) not null comment '触发器状态', + trigger_type varchar(8) not null comment '触发器的类型', + start_time bigint(13) not null comment '开始时间', + end_time bigint(13) null comment '结束时间', + calendar_name varchar(200) null comment '日程表名称', + misfire_instr smallint(2) null comment '补偿执行的策略', + job_data blob null comment '存放持久化job对象', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group) +) engine=innodb comment = '触发器详细信息表'; -- ---------------------------- -- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数 -- ---------------------------- -drop table if exists QRTZ_SIMPLE_TRIGGERS; create table QRTZ_SIMPLE_TRIGGERS ( - sched_name varchar(120) not null, - trigger_name varchar(200) not null, - trigger_group varchar(200) not null, - repeat_count bigint(7) not null, - repeat_interval bigint(12) not null, - times_triggered bigint(10) not null, - primary key (sched_name,trigger_name,trigger_group), - foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_ name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + repeat_count bigint(7) not null comment '重复的次数统计', + repeat_interval bigint(12) not null comment '重复的间隔时间', + times_triggered bigint(10) not null comment '已经触发的次数', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = '简单触发器的信息表'; -- ---------------------------- -- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息 -- ---------------------------- -drop table if exists QRTZ_CRON_TRIGGERS; create table QRTZ_CRON_TRIGGERS ( - sched_name varchar(120) not null, - trigger_name varchar(200) not null, - trigger_group varchar(200) not null, - cron_expression varchar(200) not null, - time_zone_id varchar(80), - primary key (sched_name,trigger_name,trigger_group), - foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + cron_expression varchar(200) not null comment 'cron表达式', + time_zone_id varchar(80) comment '时区', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = 'Cron类型的触发器表'; -- ---------------------------- -- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候) -- ---------------------------- -drop table if exists QRTZ_BLOB_TRIGGERS; create table QRTZ_BLOB_TRIGGERS ( - sched_name varchar(120) not null, - trigger_name varchar(200) not null, - trigger_group varchar(200) not null, - blob_data blob null, - primary key (sched_name,trigger_name,trigger_group), - foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + blob_data blob null comment '存放持久化Trigger对象', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = 'Blob类型的触发器表'; -- ---------------------------- -- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围 -- ---------------------------- -drop table if exists QRTZ_CALENDARS; create table QRTZ_CALENDARS ( - sched_name varchar(120) not null, - calendar_name varchar(200) not null, - calendar blob not null, - primary key (sched_name,calendar_name) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + calendar_name varchar(200) not null comment '日历名称', + calendar blob not null comment '存放持久化calendar对象', + primary key (sched_name, calendar_name) +) engine=innodb comment = '日历信息表'; -- ---------------------------- -- 7、 存储已暂停的 Trigger 组的信息 -- ---------------------------- -drop table if exists QRTZ_PAUSED_TRIGGER_GRPS; create table QRTZ_PAUSED_TRIGGER_GRPS ( - sched_name varchar(120) not null, - trigger_group varchar(200) not null, - primary key (sched_name,trigger_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + primary key (sched_name, trigger_group) +) engine=innodb comment = '暂停的触发器表'; -- ---------------------------- -- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息 -- ---------------------------- -drop table if exists QRTZ_FIRED_TRIGGERS; create table QRTZ_FIRED_TRIGGERS ( - sched_name varchar(120) not null, - entry_id varchar(95) not null, - trigger_name varchar(200) not null, - trigger_group varchar(200) not null, - instance_name varchar(200) not null, - fired_time bigint(13) not null, - sched_time bigint(13) not null, - priority integer not null, - state varchar(16) not null, - job_name varchar(200) null, - job_group varchar(200) null, - is_nonconcurrent varchar(1) null, - requests_recovery varchar(1) null, - primary key (sched_name,entry_id) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + entry_id varchar(95) not null comment '调度器实例id', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + instance_name varchar(200) not null comment '调度器实例名', + fired_time bigint(13) not null comment '触发的时间', + sched_time bigint(13) not null comment '定时器制定的时间', + priority integer not null comment '优先级', + state varchar(16) not null comment '状态', + job_name varchar(200) null comment '任务名称', + job_group varchar(200) null comment '任务组名', + is_nonconcurrent varchar(1) null comment '是否并发', + requests_recovery varchar(1) null comment '是否接受恢复执行', + primary key (sched_name, entry_id) +) engine=innodb comment = '已触发的触发器表'; -- ---------------------------- -- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例 -- ---------------------------- -drop table if exists QRTZ_SCHEDULER_STATE; create table QRTZ_SCHEDULER_STATE ( - sched_name varchar(120) not null, - instance_name varchar(200) not null, - last_checkin_time bigint(13) not null, - checkin_interval bigint(13) not null, - primary key (sched_name,instance_name) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + instance_name varchar(200) not null comment '之前配置文件中org.quartz.scheduler.instanceId配置的名字,就会写入该字段', + last_checkin_time bigint(13) not null comment '上次检查时间', + checkin_interval bigint(13) not null comment '检查间隔时间', + primary key (sched_name, instance_name) +) engine=innodb comment = '调度器状态表'; -- ---------------------------- -- 10、 存储程序的悲观锁的信息(假如使用了悲观锁) -- ---------------------------- -drop table if exists QRTZ_LOCKS; create table QRTZ_LOCKS ( - sched_name varchar(120) not null, - lock_name varchar(40) not null, - primary key (sched_name,lock_name) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + lock_name varchar(40) not null comment '悲观锁名称', + primary key (sched_name, lock_name) +) engine=innodb comment = '存储的悲观锁信息表'; -drop table if exists QRTZ_SIMPROP_TRIGGERS; +-- ---------------------------- +-- 11、 Quartz集群实现同步机制的行锁表 +-- ---------------------------- create table QRTZ_SIMPROP_TRIGGERS ( - sched_name varchar(120) not null, - trigger_name varchar(200) not null, - trigger_group varchar(200) not null, - str_prop_1 varchar(512) null, - str_prop_2 varchar(512) null, - str_prop_3 varchar(512) null, - int_prop_1 int null, - int_prop_2 int null, - long_prop_1 bigint null, - long_prop_2 bigint null, - dec_prop_1 numeric(13,4) null, - dec_prop_2 numeric(13,4) null, - bool_prop_1 varchar(1) null, - bool_prop_2 varchar(1) null, - primary key (sched_name,trigger_name,trigger_group), - foreign key (sched_name,trigger_name,trigger_group) references QRTZ_TRIGGERS(sched_name,trigger_name,trigger_group) -) engine=innodb; + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_ name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数', + str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数', + str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数', + int_prop_1 int null comment 'int类型的trigger的第一个参数', + int_prop_2 int null comment 'int类型的trigger的第二个参数', + long_prop_1 bigint null comment 'long类型的trigger的第一个参数', + long_prop_2 bigint null comment 'long类型的trigger的第二个参数', + dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数', + dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数', + bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数', + bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) engine=innodb comment = '同步机制的行锁表'; commit; \ No newline at end of file From 33c16e562b7521285b3179b11021c0463815646e 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 14:47:49 +0800 Subject: [PATCH 12/88] update springboot 2.5.3 => 2.5.4 update hutool 5.7.7 => 5.7.9 update feign-okhttp 11.2 => 11.6 --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index cdd1f9e4d..180f1d101 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 3.0.0 - 2.5.3 + 2.5.4 UTF-8 UTF-8 1.8 @@ -27,9 +27,9 @@ 0.9.1 3.4.3 3.9.1 - 5.7.7 + 5.7.9 3.0.3 - 11.2 + 11.6 4.9.1 2.5.0 3.16.1 @@ -40,7 +40,7 @@ 7.8.0 3.13.0 5.6.47 - 8.2.0 + 8.3.0 localhost From 40347e4cb89b14f2ddc77204475ceb471a5a980f 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 13/88] =?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 e6e10308ff1e2becf7661eb96a769b0f77a9cd77 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 20 Aug 2021 17:45:25 +0800 Subject: [PATCH 14/88] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=AF?= =?UTF-8?q?=E6=8B=96=E5=8A=A8=E5=BC=B9=E7=AA=97=E5=AE=BD=E5=BA=A6=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/directive/dialog/dragWidth.js | 31 ++++++++++++++++++++++ ruoyi-ui/src/directive/index.js | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ruoyi-ui/src/directive/dialog/dragWidth.js diff --git a/ruoyi-ui/src/directive/dialog/dragWidth.js b/ruoyi-ui/src/directive/dialog/dragWidth.js new file mode 100644 index 000000000..4ed7f2348 --- /dev/null +++ b/ruoyi-ui/src/directive/dialog/dragWidth.js @@ -0,0 +1,31 @@ +/** +* v-dialogDragWidth 可拖动弹窗宽度 +* Copyright (c) 2019 ruoyi +*/ + +export default { + bind(el) { + const dragDom = el.querySelector('.el-dialog'); + const lineEl = document.createElement('div'); + lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;'; + lineEl.addEventListener('mousedown', + function (e) { + // 鼠标按下,计算当前元素距离可视区的距离 + const disX = e.clientX - el.offsetLeft; + // 当前宽度 + const curWidth = dragDom.offsetWidth; + document.onmousemove = function (e) { + e.preventDefault(); // 移动时禁用默认事件 + // 通过事件委托,计算移动的距离 + const l = e.clientX - disX; + dragDom.style.width = `${curWidth + l}px`; + }; + document.onmouseup = function (e) { + document.onmousemove = null; + document.onmouseup = null; + }; + }, + ); + dragDom.appendChild(lineEl); + } +} \ No newline at end of file diff --git a/ruoyi-ui/src/directive/index.js b/ruoyi-ui/src/directive/index.js index 5f150c725..9bedc8a18 100644 --- a/ruoyi-ui/src/directive/index.js +++ b/ruoyi-ui/src/directive/index.js @@ -1,17 +1,18 @@ import hasRole from './permission/hasRole' import hasPermi from './permission/hasPermi' import dialogDrag from './dialog/drag' +import dialogDragWidth from './dialog/dragWidth' const install = function(Vue) { Vue.directive('hasRole', hasRole) Vue.directive('hasPermi', hasPermi) Vue.directive('dialogDrag', dialogDrag) + Vue.directive('dialogDragWidth', dialogDragWidth) } if (window.Vue) { window['hasRole'] = hasRole window['hasPermi'] = hasPermi - window['dialogDrag'] = dialogDrag Vue.use(install); // eslint-disable-line } From d1ef19f08a2cf9faa202f330798c7e6f822bb722 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 20 Aug 2021 17:57:44 +0800 Subject: [PATCH 15/88] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=AF?= =?UTF-8?q?=E6=8B=96=E5=8A=A8=E5=BC=B9=E7=AA=97=E9=AB=98=E5=BA=A6=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/directive/dialog/dragHeight.js | 34 +++++++++++++++++++++ ruoyi-ui/src/directive/dialog/dragWidth.js | 5 ++- ruoyi-ui/src/directive/index.js | 2 ++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 ruoyi-ui/src/directive/dialog/dragHeight.js diff --git a/ruoyi-ui/src/directive/dialog/dragHeight.js b/ruoyi-ui/src/directive/dialog/dragHeight.js new file mode 100644 index 000000000..db5e1dbcc --- /dev/null +++ b/ruoyi-ui/src/directive/dialog/dragHeight.js @@ -0,0 +1,34 @@ +/** +* v-dialogDragWidth 可拖动弹窗高度(右下角) +* Copyright (c) 2019 ruoyi +*/ + +export default { + bind(el) { + const dragDom = el.querySelector('.el-dialog'); + const lineEl = document.createElement('div'); + lineEl.style = 'width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;'; + lineEl.addEventListener('mousedown', + function(e) { + // 鼠标按下,计算当前元素距离可视区的距离 + const disX = e.clientX - el.offsetLeft; + const disY = e.clientY - el.offsetTop; + // 当前宽度 高度 + const curWidth = dragDom.offsetWidth; + const curHeight = dragDom.offsetHeight; + document.onmousemove = function(e) { + e.preventDefault(); // 移动时禁用默认事件 + // 通过事件委托,计算移动的距离 + const xl = e.clientX - disX; + const yl = e.clientY - disY + dragDom.style.width = `${curWidth + xl}px`; + dragDom.style.height = `${curHeight + yl}px`; + }; + document.onmouseup = function(e) { + document.onmousemove = null; + document.onmouseup = null; + }; + }, false); + dragDom.appendChild(lineEl); + } +} \ No newline at end of file diff --git a/ruoyi-ui/src/directive/dialog/dragWidth.js b/ruoyi-ui/src/directive/dialog/dragWidth.js index 4ed7f2348..e3b5f3f84 100644 --- a/ruoyi-ui/src/directive/dialog/dragWidth.js +++ b/ruoyi-ui/src/directive/dialog/dragWidth.js @@ -1,5 +1,5 @@ /** -* v-dialogDragWidth 可拖动弹窗宽度 +* v-dialogDragWidth 可拖动弹窗宽度(右侧边) * Copyright (c) 2019 ruoyi */ @@ -24,8 +24,7 @@ export default { document.onmousemove = null; document.onmouseup = null; }; - }, - ); + }, false); dragDom.appendChild(lineEl); } } \ No newline at end of file diff --git a/ruoyi-ui/src/directive/index.js b/ruoyi-ui/src/directive/index.js index 9bedc8a18..030fd4fe2 100644 --- a/ruoyi-ui/src/directive/index.js +++ b/ruoyi-ui/src/directive/index.js @@ -2,12 +2,14 @@ import hasRole from './permission/hasRole' import hasPermi from './permission/hasPermi' import dialogDrag from './dialog/drag' import dialogDragWidth from './dialog/dragWidth' +import dialogDragHeight from './dialog/dragHeight' const install = function(Vue) { Vue.directive('hasRole', hasRole) Vue.directive('hasPermi', hasPermi) Vue.directive('dialogDrag', dialogDrag) Vue.directive('dialogDragWidth', dialogDragWidth) + Vue.directive('dialogDragHeight', dialogDragHeight) } if (window.Vue) { From 0e2ff6a6da1f385415611a393c04a2192f370383 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 10:41:26 +0800 Subject: [PATCH 16/88] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96copy=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=A2=9E=E5=8A=A0=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/utils/BeanCopyUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/BeanCopyUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/BeanCopyUtils.java index bea09f8ba..16a252d0f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/BeanCopyUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/BeanCopyUtils.java @@ -2,6 +2,8 @@ import cn.hutool.core.bean.copier.BeanCopier; import cn.hutool.core.bean.copier.CopyOptions; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ReflectUtil; import java.util.List; @@ -36,6 +38,9 @@ public static V oneCopy(T source, CopyOptions copyOptions, Class desc) * @return desc */ public static V oneCopy(T source, CopyOptions copyOptions, V desc) { + if (ObjectUtil.isNull(source)) { + return null; + } return BeanCopier.create(source, desc, copyOptions).copy(); } @@ -48,6 +53,12 @@ public static V oneCopy(T source, CopyOptions copyOptions, V desc) { * @return desc */ public static List listCopy(List sourceList, CopyOptions copyOptions, Class desc) { + if (ObjectUtil.isNull(sourceList)) { + return null; + } + if (CollUtil.isEmpty(sourceList)) { + return CollUtil.newArrayList(); + } return sourceList.stream() .map(source -> oneCopy(source, copyOptions, desc)) .collect(Collectors.toList()); From 3ade542d81b68dce8e28a671965670a3a83dfa53 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 10:42:58 +0800 Subject: [PATCH 17/88] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20druid=20?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=20=E9=9B=86=E7=BE=A4=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=20=E6=97=A0=E6=B3=95=E8=B7=AF=E7=94=B1=E5=88=B0?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E5=8F=B0=E6=9C=8D=E5=8A=A1=E5=99=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20nginx=20=E4=BD=BF=E7=94=A8=20ip=5Fhash=20=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=96=B9=E5=BC=8F=20=E4=BF=9D=E9=9A=9C=E5=90=8C=20ip?= =?UTF-8?q?=20=E8=B7=AF=E7=94=B1=E5=88=B0=E5=90=8C=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/nginx/nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 66ac29e3e..a511f351b 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -22,6 +22,7 @@ http { access_log /var/log/nginx/access.log main; upstream server { + ip_hash; server 172.30.0.60:8080; server 172.30.0.61:8080; } From a0fc78f9e68fba366e7753702634ce43af60affa 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 11:58:08 +0800 Subject: [PATCH 18/88] =?UTF-8?q?remove=20=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/ruoyi-admin/Dockerfile b/ruoyi-admin/Dockerfile index dc484c5b4..88f4932b6 100644 --- a/ruoyi-admin/Dockerfile +++ b/ruoyi-admin/Dockerfile @@ -4,7 +4,6 @@ MAINTAINER Lion Li RUN mkdir -p /ruoyi/server RUN mkdir -p /ruoyi/server/logs -RUN mkdir -p /ruoyi/server/ruoyi/uploadPath WORKDIR /ruoyi/server From 92a32fe3809e4ee859916e005210d5b13be40caa 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 19/88] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=99=A8=E5=B7=A5=E5=85=B7=E7=BC=96=E5=86=99=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 --- .../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 @@ private static void invokeMethod(Object bean, String methodName, List /** * 校验是否为为class包名 - * + * * @param str 名称 * @return true是 false否 */ @@ -76,31 +75,31 @@ public static boolean isValidClassName(String invokeTarget) /** * 获取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 @@ else if (StringUtils.containsIgnoreCase(str, "D")) /** * 获取参数类型 - * + * * @param methodParams 参数相关列表 * @return 参数类型列表 */ @@ -165,7 +164,7 @@ public static Class[] getMethodParamsType(List methodParams) /** * 获取参数值 - * + * * @param methodParams 参数相关列表 * @return 参数值列表 */ From 5f2f4bb7ef3d405996d8663d311c311c13c98bd7 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: Mon, 23 Aug 2021 18:17:45 +0800 Subject: [PATCH 20/88] =?UTF-8?q?add=20=E5=A2=9E=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=A0=A1=E9=AA=8C=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/validate/QueryGroup.java | 9 +++++++++ .../src/main/resources/vm/java/controller.java.vm | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/core/validate/QueryGroup.java diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/validate/QueryGroup.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/validate/QueryGroup.java new file mode 100644 index 000000000..bbbfe0388 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/validate/QueryGroup.java @@ -0,0 +1,9 @@ +package com.ruoyi.common.core.validate; + +/** + * 校验分组 query + * + * @author Lion Li + */ +public interface QueryGroup { +} diff --git a/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/ruoyi-generator/src/main/resources/vm/java/controller.java.vm index 7aad26721..2c8caa41b 100644 --- a/ruoyi-generator/src/main/resources/vm/java/controller.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/controller.java.vm @@ -17,6 +17,7 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.validate.AddGroup; import com.ruoyi.common.core.validate.EditGroup; +import com.ruoyi.common.core.validate.QueryGroup; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import ${packageName}.domain.vo.${ClassName}Vo; @@ -51,11 +52,11 @@ public class ${ClassName}Controller extends BaseController { @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") @GetMapping("/list") #if($table.crud || $table.sub) - public TableDataInfo<${ClassName}Vo> list(@Validated ${ClassName}Bo bo) { + public TableDataInfo<${ClassName}Vo> list(@Validated(QueryGroup.class) ${ClassName}Bo bo) { return i${ClassName}Service.queryPageList(bo); } #elseif($table.tree) - public AjaxResult> list(@Validated ${ClassName}Bo bo) { + public AjaxResult> list(@Validated(QueryGroup.class) ${ClassName}Bo bo) { List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo); return AjaxResult.success(list); } From 3c0f992e76baa05c55bbe4dda1fff88322f1872d 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: Mon, 23 Aug 2021 18:20:07 +0800 Subject: [PATCH 21/88] =?UTF-8?q?fix=20=E8=A7=A3=E5=86=B3=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A0=A1=E9=AA=8C=E4=B8=8D=E9=80=9A=E8=BF=87=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/web/controller/system/SysOssConfigController.java | 3 ++- .../java/com/ruoyi/web/controller/system/SysOssController.java | 3 ++- .../java/com/ruoyi/demo/controller/TestDemoController.java | 3 ++- .../java/com/ruoyi/demo/controller/TestTreeController.java | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssConfigController.java index 60fed2a41..55f25dfa7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssConfigController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssConfigController.java @@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.validate.AddGroup; import com.ruoyi.common.core.validate.EditGroup; +import com.ruoyi.common.core.validate.QueryGroup; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.system.domain.bo.SysOssConfigBo; import com.ruoyi.system.domain.vo.SysOssConfigVo; @@ -45,7 +46,7 @@ public class SysOssConfigController extends BaseController { @ApiOperation("查询云存储配置列表") @PreAuthorize("@ss.hasPermi('system:oss:list')") @GetMapping("/list") - public TableDataInfo list(@Validated SysOssConfigBo bo) { + public TableDataInfo list(@Validated(QueryGroup.class) SysOssConfigBo bo) { return iSysOssConfigService.queryPageList(bo); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssController.java index c7772ab9c..ff379910a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysOssController.java @@ -10,6 +10,7 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.core.validate.QueryGroup; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.JsonUtils; @@ -63,7 +64,7 @@ public class SysOssController extends BaseController { @ApiOperation("查询OSS云存储列表") @PreAuthorize("@ss.hasPermi('system:oss:list')") @GetMapping("/list") - public TableDataInfo list(@Validated SysOssBo bo) { + public TableDataInfo list(@Validated(QueryGroup.class) SysOssBo bo) { return iSysOssService.queryPageList(bo); } diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java index a393c9199..db5db8c5f 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java @@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.validate.AddGroup; import com.ruoyi.common.core.validate.EditGroup; +import com.ruoyi.common.core.validate.QueryGroup; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.demo.domain.bo.TestDemoBo; @@ -48,7 +49,7 @@ public class TestDemoController extends BaseController { @ApiOperation("查询测试单表列表") @PreAuthorize("@ss.hasPermi('demo:demo:list')") @GetMapping("/list") - public TableDataInfo list(@Validated TestDemoBo bo) { + public TableDataInfo list(@Validated(QueryGroup.class) TestDemoBo bo) { return iTestDemoService.queryPageList(bo); } diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java index 63b1743ff..c34c77c4b 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java @@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.validate.AddGroup; import com.ruoyi.common.core.validate.EditGroup; +import com.ruoyi.common.core.validate.QueryGroup; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.demo.domain.bo.TestTreeBo; @@ -46,7 +47,7 @@ public class TestTreeController extends BaseController { @ApiOperation("查询测试树表列表") @PreAuthorize("@ss.hasPermi('demo:tree:list')") @GetMapping("/list") - public AjaxResult> list(@Validated TestTreeBo bo) { + public AjaxResult> list(@Validated(QueryGroup.class) TestTreeBo bo) { List list = iTestTreeService.queryList(bo); return AjaxResult.success(list); } From dea627f02cb9da7641a64fa57261fa35bd91e3d8 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: Mon, 23 Aug 2021 18:21:05 +0800 Subject: [PATCH 22/88] =?UTF-8?q?update=20=E6=9B=B4=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=B3=A8=E5=86=8C=E9=A1=B5=E9=9D=A2=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/register.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/register.vue b/ruoyi-ui/src/views/register.vue index 914fb7493..393f100d3 100644 --- a/ruoyi-ui/src/views/register.vue +++ b/ruoyi-ui/src/views/register.vue @@ -1,7 +1,7 @@ \ No newline at end of file + + + diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index 25db43f3a..b55b01150 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -110,10 +110,18 @@ - + + + - + + +