diff --git a/pom.xml b/pom.xml index 9b1b14a1..a4ecfae2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,29 +6,29 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 ruoyi http://www.ruoyi.vip 若依微服务系统 - 3.1.0 + 3.2.0 UTF-8 UTF-8 1.8 - 2.5.4 + 2.5.5 2020.0.4 2021.1 2.0.3 - 2.5.1 + 2.5.2 2.2.0 3.0.0 1.6.2 1.27.2 2.3.2 - 1.3.1 - 1.2.6 + 1.4.0 + 1.2.8 3.4.1 2.11.0 1.4 diff --git a/ruoyi-api/pom.xml b/ruoyi-api/pom.xml index 552d66a4..aa8ccde0 100644 --- a/ruoyi-api/pom.xml +++ b/ruoyi-api/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-api/ruoyi-api-system/pom.xml b/ruoyi-api/ruoyi-api-system/pom.xml index 7cf8df02..7b3a4649 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-auth/pom.xml b/ruoyi-auth/pom.xml index cb41993e..f0459836 100644 --- a/ruoyi-auth/pom.xml +++ b/ruoyi-auth/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index a91432a6..96ecdf98 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index b03079c3..f1bdf56e 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 68483e56..d3143984 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -237,22 +237,15 @@ public class ExcelUtil } } // 有数据时才处理 得到类的所有field. - Field[] allFields = clazz.getDeclaredFields(); - // 定义一个map用于存放列的序号和field. - Map fieldsMap = new HashMap(); - for (int col = 0; col < allFields.length; col++) + List fields = this.getFields(); + Map fieldsMap = new HashMap(); + for (Object[] objects : fields) { - Field field = allFields[col]; - Excel attr = field.getAnnotation(Excel.class); - if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) + Excel attr = (Excel) objects[1]; + Integer column = cellMap.get(attr.name()); + if (column != null) { - // 设置类的私有字段属性可访问. - field.setAccessible(true); - Integer column = cellMap.get(attr.name()); - if (column != null) - { - fieldsMap.put(column, field); - } + fieldsMap.put(column, objects); } } for (int i = titleNum + 1; i <= rows; i++) @@ -265,14 +258,15 @@ public class ExcelUtil continue; } T entity = null; - for (Map.Entry entry : fieldsMap.entrySet()) + for (Map.Entry entry : fieldsMap.entrySet()) { Object val = this.getCellValue(row, entry.getKey()); // 如果不存在实例则新建. entity = (entity == null ? clazz.newInstance() : entity); // 从map中得到对应列的field. - Field field = fieldsMap.get(entry.getKey()); + Field field = (Field) entry.getValue()[0]; + Excel attr = (Excel) entry.getValue()[1]; // 取得类型,并根据对象类型设置值. Class fieldType = field.getType(); if (String.class == fieldType) @@ -332,7 +326,6 @@ public class ExcelUtil } if (StringUtils.isNotNull(fieldType)) { - Excel attr = field.getAnnotation(Excel.class); String propertyName = field.getName(); if (StringUtils.isNotEmpty(attr.targetAttr())) { @@ -401,7 +394,7 @@ public class ExcelUtil */ public void importTemplateExcel(HttpServletResponse response, String sheetName) throws IOException { - importTemplateExcel(response, sheetName); + importTemplateExcel(response, sheetName, StringUtils.EMPTY); } /** @@ -490,8 +483,6 @@ public class ExcelUtil { Field field = (Field) os[0]; Excel excel = (Excel) os[1]; - // 设置实体类私有属性可访问 - field.setAccessible(true); this.addCell(excel, row, vo, field, column++); } } @@ -988,7 +979,17 @@ public class ExcelUtil */ private void createExcelField() { - this.fields = new ArrayList(); + this.fields = getFields(); + this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList()); + this.maxHeight = getRowHeight(); + } + + /** + * 获取字段注解信息 + */ + public List getFields() + { + List fields = new ArrayList(); List tempFields = new ArrayList<>(); tempFields.addAll(Arrays.asList(clazz.getSuperclass().getDeclaredFields())); tempFields.addAll(Arrays.asList(clazz.getDeclaredFields())); @@ -997,7 +998,12 @@ public class ExcelUtil // 单注解 if (field.isAnnotationPresent(Excel.class)) { - putToField(field, field.getAnnotation(Excel.class)); + Excel attr = field.getAnnotation(Excel.class); + if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) + { + field.setAccessible(true); + fields.add(new Object[] { field, attr }); + } } // 多注解 @@ -1005,14 +1011,17 @@ public class ExcelUtil { Excels attrs = field.getAnnotation(Excels.class); Excel[] excels = attrs.value(); - for (Excel excel : excels) + for (Excel attr : excels) { - putToField(field, excel); + if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) + { + field.setAccessible(true); + fields.add(new Object[] { field, attr }); + } } } } - this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList()); - this.maxHeight = getRowHeight(); + return fields; } /** @@ -1029,17 +1038,6 @@ public class ExcelUtil return (short) (maxHeight * 20); } - /** - * 放到字段集合中 - */ - private void putToField(Field field, Excel attr) - { - if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) - { - this.fields.add(new Object[] { field, attr }); - } - } - /** * 创建一个工作簿 */ diff --git a/ruoyi-common/ruoyi-common-datascope/pom.xml b/ruoyi-common/ruoyi-common-datascope/pom.xml index e338f727..50743d96 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-datasource/pom.xml b/ruoyi-common/ruoyi-common-datasource/pom.xml index 4efa4a15..d15bc86d 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-log/pom.xml b/ruoyi-common/ruoyi-common-log/pom.xml index bf6510db..eb5c2a1d 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-redis/pom.xml b/ruoyi-common/ruoyi-common-redis/pom.xml index ea0d2975..167bb718 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-security/pom.xml b/ruoyi-common/ruoyi-common-security/pom.xml index e5d62b22..4a77fd30 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-common/ruoyi-common-swagger/pom.xml b/ruoyi-common/ruoyi-common-swagger/pom.xml index d9b69912..3ce5e309 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.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-gateway/pom.xml b/ruoyi-gateway/pom.xml index b0b5c546..50bf4875 100644 --- a/ruoyi-gateway/pom.xml +++ b/ruoyi-gateway/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-modules/pom.xml b/ruoyi-modules/pom.xml index 047ae2d7..abc49192 100644 --- a/ruoyi-modules/pom.xml +++ b/ruoyi-modules/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-file/pom.xml b/ruoyi-modules/ruoyi-file/pom.xml index 9a6cb51b..e335dadb 100644 --- a/ruoyi-modules/ruoyi-file/pom.xml +++ b/ruoyi-modules/ruoyi-file/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-gen/pom.xml b/ruoyi-modules/ruoyi-gen/pom.xml index 0eeb170a..21d5b7e9 100644 --- a/ruoyi-modules/ruoyi-gen/pom.xml +++ b/ruoyi-modules/ruoyi-gen/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-job/pom.xml b/ruoyi-modules/ruoyi-job/pom.xml index d8f18876..9a831648 100644 --- a/ruoyi-modules/ruoyi-job/pom.xml +++ b/ruoyi-modules/ruoyi-job/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml index 85bf5845..6411fb32 100644 --- a/ruoyi-modules/ruoyi-system/pom.xml +++ b/ruoyi-modules/ruoyi-system/pom.xml @@ -5,7 +5,7 @@ com.ruoyi ruoyi-modules - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 1cd7009e..e28857f9 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -169,6 +169,7 @@ public class SysMenuServiceImpl implements ISysMenuService children.setComponent(menu.getComponent()); children.setName(StringUtils.capitalize(menu.getPath())); children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); + children.setQuery(menu.getQuery()); childrenList.add(children); router.setChildren(childrenList); } diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 9e82cb21..fbcebb9a 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "3.1.0", + "version": "3.2.0", "description": "若依管理系统", "author": "若依", "license": "MIT", @@ -41,8 +41,8 @@ "clipboard": "2.0.6", "core-js": "3.8.1", "echarts": "4.9.0", - "element-ui": "2.15.5", - "file-saver": "2.0.4", + "element-ui": "2.15.6", + "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", "js-beautify": "1.13.0", @@ -71,8 +71,8 @@ "eslint-plugin-vue": "7.2.0", "lint-staged": "10.5.3", "runjs": "4.4.2", - "sass": "1.32.0", - "sass-loader": "10.1.0", + "sass": "1.32.13", + "sass-loader": "10.1.1", "script-ext-html-webpack-plugin": "2.1.5", "svg-sprite-loader": "5.1.1", "vue-template-compiler": "2.6.12" diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 37e95fda..8498e6a3 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -146,6 +146,55 @@ 更新日志 + +
    +
  1. 菜单管理支持配置路由参数
  2. +
  3. 定时任务支持在线生成cron表达式
  4. +
  5. 自定义弹层溢出滚动样式
  6. +
  7. 自定义可拖动弹窗宽度指令
  8. +
  9. 自定义可拖动弹窗高度指令
  10. +
  11. 修改时检查用户数据权限范围
  12. +
  13. 修复保存配置主题颜色失效问题
  14. +
  15. 新增暗色菜单风格主题
  16. +
  17. 菜单&部门新增展开/折叠功能
  18. +
  19. 页签新增关闭左侧&添加图标
  20. +
  21. 代码生成主子表多选行数据
  22. +
  23. 日期范围支持添加多组
  24. +
  25. Excel导入支持@Excels注解
  26. +
  27. Excel注解支持导入导出标题信息
  28. +
  29. Excel注解支持自定义数据处理器
  30. +
  31. 日志注解新增是否保存响应参数
  32. +
  33. 定时任务对检查异常进行事务回滚
  34. +
  35. 补充定时任务表字段注释
  36. +
  37. 定时任务屏蔽ldap远程调用
  38. +
  39. 新增通用方法简化下载使用
  40. +
  41. 新增通用方法简化模态/缓存使用
  42. +
  43. 新增data-dict组件简化数据字典使用
  44. +
  45. 禁用dict-tag组件的渐变动画
  46. +
  47. 默认首页使用keep-alive缓存
  48. +
  49. 升级springcloud到最新版2020.0.4
  50. +
  51. 升级spring-boot到最新版本2.5.5
  52. +
  53. 升级spring-boot-admin到最新版2.5.2
  54. +
  55. 升级pagehelper到最新版1.4.0
  56. +
  57. 升级fastjson到最新版1.2.78
  58. +
  59. 升级druid到最新版1.2.8
  60. +
  61. 升级element-ui到最新版本2.15.6
  62. +
  63. 升级sass-loader到最新版本10.1.1
  64. +
  65. 升级dart-sass到版本1.32.13
  66. +
  67. 升级file-saver到最新版本2.0.5
  68. +
  69. 优化异常处理信息
  70. +
  71. 验证码默认20s超时
  72. +
  73. 优化代码生成导入表按创建时间排序
  74. +
  75. 优化代码生成点击预览重置激活tab
  76. +
  77. 修复主子表代码模板方法名错误问题
  78. +
  79. 修复xss过滤后格式出现的异常
  80. +
  81. 修复多图组件验证失败被删除问题
  82. +
  83. 请求参数新增reasonable分页合理化属性
  84. +
  85. 修复代码生成页面数据编辑保存之后总是跳转第一页的问题
  86. +
  87. 修复带safari浏览器无法格式化utc日期格式yyyy-MM-dd'T'HH:mm:ss.SSS问题
  88. +
  89. 其他细节优化
  90. +
+
  1. 支持配置XSS跨站脚本过滤
  2. @@ -560,7 +609,7 @@ export default { data() { return { // 版本号 - version: "3.1.0", + version: "3.2.0", }; }, methods: { diff --git a/ruoyi-visual/pom.xml b/ruoyi-visual/pom.xml index b8737caf..ee76ddeb 100644 --- a/ruoyi-visual/pom.xml +++ b/ruoyi-visual/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi - 3.1.0 + 3.2.0 4.0.0 diff --git a/ruoyi-visual/ruoyi-monitor/pom.xml b/ruoyi-visual/ruoyi-monitor/pom.xml index b4761f3e..63c57ea6 100644 --- a/ruoyi-visual/ruoyi-monitor/pom.xml +++ b/ruoyi-visual/ruoyi-monitor/pom.xml @@ -4,7 +4,7 @@ com.ruoyi ruoyi-visual - 3.1.0 + 3.2.0 4.0.0