diff --git a/pom.xml b/pom.xml index ee6053d2..7248b6ee 100644 --- a/pom.xml +++ b/pom.xml @@ -6,14 +6,14 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 ruoyi http://www.ruoyi.vip 若依微服务系统 - 3.2.0 + 3.3.0 UTF-8 UTF-8 1.8 @@ -29,7 +29,7 @@ 2.3.2 1.4.0 1.2.8 - 3.4.1 + 3.5.0 2.11.0 1.4 2.3 @@ -40,6 +40,7 @@ 2.10.0 3.2.2 2.12.2 + 2.16.0 @@ -190,6 +191,19 @@ ${common-pool.version} + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + + + + org.apache.logging.log4j + log4j-to-slf4j + ${log4j2.version} + + com.ruoyi diff --git a/ruoyi-api/pom.xml b/ruoyi-api/pom.xml index aa8ccde0..2eeb4cc5 100644 --- a/ruoyi-api/pom.xml +++ b/ruoyi-api/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-api/ruoyi-api-system/pom.xml b/ruoyi-api/ruoyi-api-system/pom.xml index 7b3a4649..ad926141 100644 --- a/ruoyi-api/ruoyi-api-system/pom.xml +++ b/ruoyi-api/ruoyi-api-system/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-api - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-auth/pom.xml b/ruoyi-auth/pom.xml index f0459836..933c6ea2 100644 --- a/ruoyi-auth/pom.xml +++ b/ruoyi-auth/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 96ecdf98..ad5f6177 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index 3bc14f45..4424f157 100644 --- a/ruoyi-common/ruoyi-common-core/pom.xml +++ b/ruoyi-common/ruoyi-common-core/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-datascope/pom.xml b/ruoyi-common/ruoyi-common-datascope/pom.xml index 50743d96..cf500507 100644 --- a/ruoyi-common/ruoyi-common-datascope/pom.xml +++ b/ruoyi-common/ruoyi-common-datascope/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-datasource/pom.xml b/ruoyi-common/ruoyi-common-datasource/pom.xml index d15bc86d..e3e2b516 100644 --- a/ruoyi-common/ruoyi-common-datasource/pom.xml +++ b/ruoyi-common/ruoyi-common-datasource/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-log/pom.xml b/ruoyi-common/ruoyi-common-log/pom.xml index eb5c2a1d..8a0803f9 100644 --- a/ruoyi-common/ruoyi-common-log/pom.xml +++ b/ruoyi-common/ruoyi-common-log/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-redis/pom.xml b/ruoyi-common/ruoyi-common-redis/pom.xml index 167bb718..909130c7 100644 --- a/ruoyi-common/ruoyi-common-redis/pom.xml +++ b/ruoyi-common/ruoyi-common-redis/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-security/pom.xml b/ruoyi-common/ruoyi-common-security/pom.xml index 130303c8..79985838 100644 --- a/ruoyi-common/ruoyi-common-security/pom.xml +++ b/ruoyi-common/ruoyi-common-security/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-swagger/pom.xml b/ruoyi-common/ruoyi-common-swagger/pom.xml index e53a5fe3..bd78362b 100644 --- a/ruoyi-common/ruoyi-common-swagger/pom.xml +++ b/ruoyi-common/ruoyi-common-swagger/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-common - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-gateway/pom.xml b/ruoyi-gateway/pom.xml index 50bf4875..bb049553 100644 --- a/ruoyi-gateway/pom.xml +++ b/ruoyi-gateway/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-modules/pom.xml b/ruoyi-modules/pom.xml index abc49192..e88ccea7 100644 --- a/ruoyi-modules/pom.xml +++ b/ruoyi-modules/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-file/pom.xml b/ruoyi-modules/ruoyi-file/pom.xml index e335dadb..349cfc91 100644 --- a/ruoyi-modules/ruoyi-file/pom.xml +++ b/ruoyi-modules/ruoyi-file/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-gen/pom.xml b/ruoyi-modules/ruoyi-gen/pom.xml index f61269d3..ad9c7d82 100644 --- a/ruoyi-modules/ruoyi-gen/pom.xml +++ b/ruoyi-modules/ruoyi-gen/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-job/pom.xml b/ruoyi-modules/ruoyi-job/pom.xml index 9a831648..d57c0cee 100644 --- a/ruoyi-modules/ruoyi-job/pom.xml +++ b/ruoyi-modules/ruoyi-job/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/JobInvokeUtil.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/JobInvokeUtil.java index a3527e10..0bfc2f74 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/JobInvokeUtil.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/JobInvokeUtil.java @@ -110,30 +110,30 @@ public class JobInvokeUtil { return null; } - String[] methodParams = methodStr.split(",(?=(?:[^\']*\"[^\']*\')*[^\']*$)"); + String[] methodParams = methodStr.split(",(?=([^\"']*[\"'][^\"']*[\"'])*[^\"']*$)"); List classs = new LinkedList<>(); for (int i = 0; i < methodParams.length; i++) { String str = StringUtils.trimToEmpty(methodParams[i]); - // String字符串类型,包含' - if (StringUtils.contains(str, "'")) + // String字符串类型,以'或"开头 + if (StringUtils.startsWithAny(str, "'", "\"")) { - classs.add(new Object[] { StringUtils.replace(str, "'", ""), String.class }); + classs.add(new Object[] { StringUtils.substring(str, 1, str.length() - 1), String.class }); } // boolean布尔类型,等于true或者false - else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false")) + else if ("true".equalsIgnoreCase(str) || "false".equalsIgnoreCase(str)) { classs.add(new Object[] { Boolean.valueOf(str), Boolean.class }); } - // long长整形,包含L - else if (StringUtils.containsIgnoreCase(str, "L")) + // long长整形,以L结尾 + else if (StringUtils.endsWith(str, "L")) { - classs.add(new Object[] { Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class }); + classs.add(new Object[] { Long.valueOf(StringUtils.substring(str, 0, str.length() - 1)), Long.class }); } - // double浮点类型,包含D - else if (StringUtils.containsIgnoreCase(str, "D")) + // double浮点类型,以D结尾 + else if (StringUtils.endsWith(str, "D")) { - classs.add(new Object[] { Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class }); + classs.add(new Object[] { Double.valueOf(StringUtils.substring(str, 0, str.length() - 1)), Double.class }); } // 其他类型归类为整形 else diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml index 6411fb32..48a662c1 100644 --- a/ruoyi-modules/ruoyi-system/pom.xml +++ b/ruoyi-modules/ruoyi-system/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 73c1818c..a4961db2 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "3.2.0", + "version": "3.3.0", "description": "若依管理系统", "author": "若依", "license": "MIT", @@ -38,7 +38,7 @@ "dependencies": { "@riophae/vue-treeselect": "0.4.0", "axios": "0.24.0", - "clipboard": "2.0.6", + "clipboard": "2.0.8", "core-js": "3.19.1", "echarts": "4.9.0", "element-ui": "2.15.6", diff --git a/ruoyi-ui/src/directive/index.js b/ruoyi-ui/src/directive/index.js index 5801640a..b9b07da3 100644 --- a/ruoyi-ui/src/directive/index.js +++ b/ruoyi-ui/src/directive/index.js @@ -3,10 +3,12 @@ import hasPermi from './permission/hasPermi' import dialogDrag from './dialog/drag' import dialogDragWidth from './dialog/dragWidth' import dialogDragHeight from './dialog/dragHeight' +import clipboard from './module/clipboard' const install = function(Vue) { Vue.directive('hasRole', hasRole) Vue.directive('hasPermi', hasPermi) + Vue.directive('clipboard', clipboard) Vue.directive('dialogDrag', dialogDrag) Vue.directive('dialogDragWidth', dialogDragWidth) Vue.directive('dialogDragHeight', dialogDragHeight) diff --git a/ruoyi-ui/src/directive/module/clipboard.js b/ruoyi-ui/src/directive/module/clipboard.js new file mode 100644 index 00000000..49c572d5 --- /dev/null +++ b/ruoyi-ui/src/directive/module/clipboard.js @@ -0,0 +1,54 @@ +/** +* v-clipboard 文字复制剪贴 +* Copyright (c) 2021 ruoyi +*/ + +import Clipboard from 'clipboard' +export default { + bind(el, binding, vnode) { + switch (binding.arg) { + case 'success': + el._vClipBoard_success = binding.value; + break; + case 'error': + el._vClipBoard_error = binding.value; + break; + default: { + const clipboard = new Clipboard(el, { + text: () => binding.value, + action: () => binding.arg === 'cut' ? 'cut' : 'copy' + }); + clipboard.on('success', e => { + const callback = el._vClipBoard_success; + callback && callback(e); + }); + clipboard.on('error', e => { + const callback = el._vClipBoard_error; + callback && callback(e); + }); + el._vClipBoard = clipboard; + } + } + }, + update(el, binding) { + if (binding.arg === 'success') { + el._vClipBoard_success = binding.value; + } else if (binding.arg === 'error') { + el._vClipBoard_error = binding.value; + } else { + el._vClipBoard.text = function () { return binding.value; }; + el._vClipBoard.action = () => binding.arg === 'cut' ? 'cut' : 'copy'; + } + }, + unbind(el, binding) { + if (!el._vClipboard) return + if (binding.arg === 'success') { + delete el._vClipBoard_success; + } else if (binding.arg === 'error') { + delete el._vClipBoard_error; + } else { + el._vClipBoard.destroy(); + delete el._vClipBoard; + } + } +} diff --git a/ruoyi-ui/src/plugins/download.js b/ruoyi-ui/src/plugins/download.js index e3983731..cfb7c246 100644 --- a/ruoyi-ui/src/plugins/download.js +++ b/ruoyi-ui/src/plugins/download.js @@ -2,6 +2,7 @@ import axios from 'axios' import { Message } from 'element-ui' import { saveAs } from 'file-saver' import { getToken } from '@/utils/auth' +import errorCode from '@/utils/errorCode' import { blobValidate } from "@/utils/ruoyi"; const baseURL = process.env.VUE_APP_BASE_API @@ -20,12 +21,18 @@ export default { const blob = new Blob([res.data], { type: 'application/zip' }) this.saveAs(blob, name) } else { - Message.error('无效的会话,或者会话已过期,请重新登录。'); + this.printErrMsg(res.data); } }) }, saveAs(text, name, opts) { saveAs(text, name, opts); + }, + async printErrMsg(data) { + const resText = await data.text(); + const rspObj = JSON.parse(resText); + const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] + Message.error(errMsg); } } diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 86342eab..ee612ecd 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -108,7 +108,10 @@ export function download(url, params, filename) { const blob = new Blob([data]) saveAs(blob, filename) } else { - Message.error('无效的会话,或者会话已过期,请重新登录。'); + const resText = await data.text(); + const rspObj = JSON.parse(resText); + const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] + Message.error(errMsg); } downloadLoadingInstance.close(); }).catch((r) => { diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 58d95deb..fbf3923f 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -146,6 +146,39 @@ 更新日志 + +
    +
  1. 新增配套并同步的Vue3前端版本
  2. +
  3. 新增认证对象简化权限验证
  4. +
  5. 新增tab对象简化页签操作
  6. +
  7. 修改获取缓存信息方式
  8. +
  9. 修改权限认证注解实现
  10. +
  11. 自定义文字复制剪贴指令
  12. +
  13. 升级axios到最新版本0.24.0
  14. +
  15. 升级core-js到最新版本3.19.1
  16. +
  17. 升级jsencrypt到最新版本3.2.1
  18. +
  19. 升级js-cookie到最新版本3.0.1
  20. +
  21. 升级clipboard到最新版本2.0.8
  22. +
  23. 升级velocity到最新版本2.3
  24. +
  25. 升级spring-boot到最新版本2.5.6
  26. +
  27. 升级spring-boot-admin到最新版2.5.4
  28. +
  29. 升级dynamic-ds到最新版本3.5.0
  30. +
  31. 代码生成预览支持复制内容
  32. +
  33. 修复五级以上菜单出现的404问题
  34. +
  35. 生产环境使用路由懒加载提升页面响应速度
  36. +
  37. 任务屏蔽违规字符&参数忽略双引号中的逗号
  38. +
  39. 优化用户个人信息接口防止修改用户名
  40. +
  41. 优化登录/验证码请求headers不设置token
  42. +
  43. 优化注册成功提示消息类型success
  44. +
  45. 优化下载解析blob响应是否登录失效
  46. +
  47. 修复字符串无法被反转义问题
  48. +
  49. 修复响应体过大出现的乱码问题
  50. +
  51. 修复回显数据字典组的键值错误
  52. +
  53. 修复代码生成复选框字典遗漏问题
  54. +
  55. 修复代码生成模板主子表删除缺少事务
  56. +
  57. 其他细节优化
  58. +
+
  1. 菜单管理支持配置路由参数
  2. @@ -609,7 +642,7 @@ export default { data() { return { // 版本号 - version: "3.2.0", + version: "3.3.0", }; }, methods: { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 1f24fa9c..27875b88 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -169,7 +169,8 @@ :name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))" :key="key" > -
    + 复制 +
    @@ -306,6 +307,10 @@ export default { const result = hljs.highlight(language, code || "", true); return result.value || ' '; }, + /** 复制代码成功 */ + clipboardSuccess(){ + this.$modal.msgSuccess("复制成功"); + }, // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.tableId); diff --git a/ruoyi-visual/pom.xml b/ruoyi-visual/pom.xml index ee76ddeb..55599104 100644 --- a/ruoyi-visual/pom.xml +++ b/ruoyi-visual/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.2.0 + 3.3.0 4.0.0 diff --git a/ruoyi-visual/ruoyi-monitor/pom.xml b/ruoyi-visual/ruoyi-monitor/pom.xml index 63c57ea6..81154770 100644 --- a/ruoyi-visual/ruoyi-monitor/pom.xml +++ b/ruoyi-visual/ruoyi-monitor/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi-visual - 3.2.0 + 3.3.0 4.0.0