Răsfoiți Sursa

Merge branch 'master' of https://github.com/YunaiV/ruoyi-vue-pro into feature/1.6.2

YunaiV 3 ani în urmă
părinte
comite
ed847ac2ee
92 a modificat fișierele cu 899 adăugiri și 3987 ștergeri
  1. 26 0
      .gitee/ISSUE_TEMPLATE.zh-CN.md
  2. 34 0
      .github/ISSUE_TEMPLATE/question.md
  3. 1 1
      sql/mysql/ruoyi-vue-pro.sql
  4. 155 155
      sql/oracle/ruoyi-vue-pro.sql
  5. 57 57
      sql/postgresql/ruoyi-vue-pro.sql
  6. 1 3536
      sql/sqlserver/ruoyi-vue-pro.sql
  7. 8 0
      yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml
  8. 70 0
      yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/type/EncryptTypeHandler.java
  9. 1 1
      yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/type/StringListTypeHandler.java
  10. 4 1
      yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/db/DataSourceConfigDO.java
  11. 1 12
      yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DataSourceConfigServiceImpl.java
  12. 31 7
      yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/db/DataSourceConfigServiceImplTest.java
  13. 1 1
      yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java
  14. 2 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sensitiveword/SensitiveWordDO.java
  15. 2 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/PostMapper.java
  16. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/DictDataMapper.java
  17. 3 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/DictTypeMapper.java
  18. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/ErrorCodeMapper.java
  19. 2 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notice/NoticeMapper.java
  20. 2 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/RoleMapper.java
  21. 4 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java
  22. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java
  23. 8 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java
  24. 3 0
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java
  25. 36 0
      yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/core/TipApplicationRunner.java
  26. 4 0
      yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/package-info.java
  27. 0 4
      yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/core/package-info.java
  28. BIN
      yudao-server/src/main/resources/admin-ui/static/img/bg-mobile.0e3df208.png
  29. BIN
      yudao-server/src/main/resources/admin-ui/static/img/bg.9bed9548.png
  30. BIN
      yudao-server/src/main/resources/admin-ui/static/img/pic.49137f73.png
  31. BIN
      yudao-server/src/main/resources/admin-ui/static/img/profile.2a8ee7b7.jpg
  32. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/10.js
  33. BIN
      yudao-server/src/main/resources/admin-ui/static/js/10.js.gz
  34. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/11.js
  35. BIN
      yudao-server/src/main/resources/admin-ui/static/js/11.js.gz
  36. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/12.js
  37. BIN
      yudao-server/src/main/resources/admin-ui/static/js/12.js.gz
  38. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/13.js
  39. BIN
      yudao-server/src/main/resources/admin-ui/static/js/13.js.gz
  40. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/14.js
  41. BIN
      yudao-server/src/main/resources/admin-ui/static/js/14.js.gz
  42. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/15.js
  43. BIN
      yudao-server/src/main/resources/admin-ui/static/js/15.js.gz
  44. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/16.js
  45. BIN
      yudao-server/src/main/resources/admin-ui/static/js/16.js.gz
  46. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/17.js
  47. BIN
      yudao-server/src/main/resources/admin-ui/static/js/17.js.gz
  48. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/18.js
  49. BIN
      yudao-server/src/main/resources/admin-ui/static/js/18.js.gz
  50. 51 0
      yudao-server/src/main/resources/admin-ui/static/js/2.js
  51. BIN
      yudao-server/src/main/resources/admin-ui/static/js/2.js.gz
  52. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/20.js
  53. BIN
      yudao-server/src/main/resources/admin-ui/static/js/20.js.gz
  54. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/21.js
  55. BIN
      yudao-server/src/main/resources/admin-ui/static/js/21.js.gz
  56. 8 8
      yudao-server/src/main/resources/admin-ui/static/js/4.js
  57. BIN
      yudao-server/src/main/resources/admin-ui/static/js/4.js.gz
  58. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/5.js
  59. BIN
      yudao-server/src/main/resources/admin-ui/static/js/5.js.gz
  60. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/6.js
  61. BIN
      yudao-server/src/main/resources/admin-ui/static/js/6.js.gz
  62. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/7.js
  63. BIN
      yudao-server/src/main/resources/admin-ui/static/js/7.js.gz
  64. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/8.js
  65. BIN
      yudao-server/src/main/resources/admin-ui/static/js/8.js.gz
  66. 2 2
      yudao-server/src/main/resources/admin-ui/static/js/9.js
  67. BIN
      yudao-server/src/main/resources/admin-ui/static/js/9.js.gz
  68. 0 0
      yudao-server/src/main/resources/admin-ui/static/js/app.js
  69. BIN
      yudao-server/src/main/resources/admin-ui/static/js/app.js.gz
  70. 4 0
      yudao-ui-admin/.npmrc
  71. 7 6
      yudao-ui-admin/package.json
  72. 2 1
      yudao-ui-admin/src/components/generator/config.js
  73. 42 0
      yudao-ui-admin/src/components/parser/Parser.vue
  74. 6 13
      yudao-ui-admin/src/layout/components/TagsView/index.vue
  75. 3 2
      yudao-ui-admin/src/main.js
  76. 3 0
      yudao-ui-admin/src/store/modules/permission.js
  77. 26 2
      yudao-ui-admin/src/store/modules/tagsView.js
  78. 81 7
      yudao-ui-admin/src/utils/auth.js
  79. 2 2
      yudao-ui-admin/src/utils/constants.js
  80. 12 0
      yudao-ui-admin/src/utils/index.js
  81. 83 77
      yudao-ui-admin/src/utils/request.js
  82. 2 2
      yudao-ui-admin/src/views/bpm/model/index.vue
  83. 1 2
      yudao-ui-admin/src/views/bpm/processInstance/create.vue
  84. 1 1
      yudao-ui-admin/src/views/bpm/processInstance/index.vue
  85. 1 1
      yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue
  86. 28 27
      yudao-ui-admin/src/views/login.vue
  87. 8 8
      yudao-ui-admin/src/views/pay/refund/index.vue
  88. 42 14
      yudao-ui-admin/src/views/socialLogin.vue
  89. 1 1
      yudao-ui-admin/src/views/system/oauth2/client/index.vue
  90. 1 1
      yudao-ui-admin/src/views/system/sensitiveWord/index.vue
  91. 1 1
      yudao-ui-admin/src/views/system/sms/smsTemplate.vue
  92. 2 2
      yudao-ui-admin/src/views/system/user/index.vue

+ 26 - 0
.gitee/ISSUE_TEMPLATE.zh-CN.md

@@ -0,0 +1,26 @@
+### 基本信息
+
+- ruoyi-vue-pro 版本:
+- 操作系统:
+- 数据库:
+
+### 复现步骤
+
+第一步,
+
+第二步,
+
+第三步,
+
+### 报错信息
+
+[截图]
+
+[截图]
+
+---
+
+建议:项目不是很难,碰到问题时,建议先花 2-4 小时的时间进行自查。
+
+Issue 中如果带上自己的分析,可以被更快更高效的解决。
+

+ 34 - 0
.github/ISSUE_TEMPLATE/question.md

@@ -0,0 +1,34 @@
+---
+name: 问题反馈
+about: 请详细描述,以便更高快的获得到解决
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+### 基本信息
+
+- ruoyi-vue-pro 版本:
+- 操作系统:
+- 数据库:
+
+### 复现步骤
+
+第一步,
+
+第二步,
+
+第三步,
+
+### 报错信息
+
+[截图]
+
+[截图]
+
+---
+
+建议:项目不是很难,碰到问题时,建议先花 2-4 小时的时间进行自查。
+
+Issue 中如果带上自己的分析,可以被更快更高效的解决。

+ 1 - 1
sql/mysql/ruoyi-vue-pro.sql

@@ -1797,7 +1797,7 @@ CREATE TABLE `system_oauth2_client`  (
 -- Records of system_oauth2_client
 -- ----------------------------
 BEGIN;
-INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `auto_approve`, `authorized_grant_types`, `scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 180, 8640, '[\"https://www.iocoder.cn\",\"https://doc.iocoder.cn\"]', b'1', '[\"password\",\"authorization_code\",\"implicit\",\"refresh_token\"]', '[\"user_info\"]', '[\"system:user:query\"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2022-05-12 01:00:20', b'0');
+INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `auto_approve`, `authorized_grant_types`, `scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 999999999, 8640, '[\"https://www.iocoder.cn\",\"https://doc.iocoder.cn\"]', b'1', '[\"password\",\"authorization_code\",\"implicit\",\"refresh_token\"]', '[\"user_info\"]', '[\"system:user:query\"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2022-05-12 01:00:20', b'0');
 INSERT INTO `system_oauth2_client` (`id`, `client_id`, `secret`, `name`, `logo`, `description`, `status`, `access_token_validity_seconds`, `refresh_token_validity_seconds`, `redirect_uris`, `auto_approve`, `authorized_grant_types`, `scopes`, `authorities`, `resource_ids`, `additional_information`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', NULL, 0, 1800, 43200, '[\"https://www.iocoder.cn\"]', b'1', '[\"password\",\"authorization_code\",\"implicit\"]', '[]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2022-05-12 00:59:53', b'0');
 COMMIT;
 

+ 155 - 155
sql/oracle/ruoyi-vue-pro.sql

@@ -38,8 +38,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -96,8 +96,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -159,8 +159,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -224,8 +224,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -284,8 +284,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -342,8 +342,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -400,8 +400,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -463,8 +463,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -543,8 +543,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -645,8 +645,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -718,8 +718,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -780,8 +780,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -839,8 +839,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -891,8 +891,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -943,8 +943,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -997,8 +997,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1051,8 +1051,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1111,8 +1111,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1167,8 +1167,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1224,8 +1224,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1282,8 +1282,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1339,8 +1339,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1396,8 +1396,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1449,8 +1449,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1508,8 +1508,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1587,8 +1587,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1663,8 +1663,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1740,8 +1740,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1805,8 +1805,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1838,8 +1838,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1873,8 +1873,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1917,8 +1917,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1957,8 +1957,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -1990,8 +1990,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2024,8 +2024,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2058,8 +2058,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2095,8 +2095,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2139,8 +2139,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2185,8 +2185,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2230,8 +2230,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2301,8 +2301,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2491,8 +2491,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2582,8 +2582,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2641,8 +2641,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2705,8 +2705,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -2994,8 +2994,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3049,8 +3049,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3114,8 +3114,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3153,7 +3153,7 @@ COMMENT ON TABLE "SYSTEM_OAUTH2_CLIENT" IS 'OAuth2 客户端表';
 -- Records of SYSTEM_OAUTH2_CLIENT
 -- ----------------------------
 INSERT INTO "SYSTEM_OAUTH2_CLIENT" ("ID", "CLIENT_ID", "SECRET", "NAME", "LOGO", "DESCRIPTION", "STATUS", "ACCESS_TOKEN_VALIDITY_SECONDS", "REFRESH_TOKEN_VALIDITY_SECONDS", "REDIRECT_URIS", "AUTO_APPROVE", "AUTHORIZED_GRANT_TYPES", "SCOPES", "AUTHORITIES", "RESOURCE_IDS", "ADDITIONAL_INFORMATION", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('1', 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', '0', '180', '8640', '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '1', '["password","authorization_code","implicit","refresh_token"]', '["user_info"]', '["system:user:query"]', '[]', '{}', '1', TO_DATE('2022-05-11 21:47:12', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-12 01:00:20', 'SYYYY-MM-DD HH24:MI:SS'), '0');
-INSERT INTO "SYSTEM_OAUTH2_CLIENT" ("ID", "CLIENT_ID", "SECRET", "NAME", "LOGO", "DESCRIPTION", "STATUS", "ACCESS_TOKEN_VALIDITY_SECONDS", "REFRESH_TOKEN_VALIDITY_SECONDS", "REDIRECT_URIS", "AUTO_APPROVE", "AUTHORIZED_GRANT_TYPES", "SCOPES", "AUTHORITIES", "RESOURCE_IDS", "ADDITIONAL_INFORMATION", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('40', 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', NULL, '0', '1800', '43200', '["https://www.iocoder.cn"]', '1', '["password","authorization_code","implicit"]', '[]', '[]', '[]', '{}', '1', TO_DATE('2022-05-12 00:28:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-13 09:41:21', 'SYYYY-MM-DD HH24:MI:SS'), '0');
+INSERT INTO "SYSTEM_OAUTH2_CLIENT" ("ID", "CLIENT_ID", "SECRET", "NAME", "LOGO", "DESCRIPTION", "STATUS", "ACCESS_TOKEN_VALIDITY_SECONDS", "REFRESH_TOKEN_VALIDITY_SECONDS", "REDIRECT_URIS", "AUTO_APPROVE", "AUTHORIZED_GRANT_TYPES", "SCOPES", "AUTHORITIES", "RESOURCE_IDS", "ADDITIONAL_INFORMATION", "CREATOR", "CREATE_TIME", "UPDATER", "UPDATE_TIME", "DELETED") VALUES ('40', 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', NULL, '0', '999999999', '43200', '["https://www.iocoder.cn"]', '1', '["password","authorization_code","implicit"]', '[]', '[]', '[]', '{}', '1', TO_DATE('2022-05-12 00:28:20', 'SYYYY-MM-DD HH24:MI:SS'), '1', TO_DATE('2022-05-13 09:41:21', 'SYYYY-MM-DD HH24:MI:SS'), '0');
 COMMIT;
 COMMIT;
 
@@ -3180,8 +3180,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3249,8 +3249,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3318,8 +3318,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3380,8 +3380,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3441,8 +3441,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3631,8 +3631,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3687,8 +3687,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3749,8 +3749,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3825,8 +3825,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3901,8 +3901,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -3974,8 +3974,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -4037,8 +4037,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -4096,8 +4096,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -4158,8 +4158,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -4232,8 +4232,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -4284,8 +4284,8 @@ NOCOMPRESS
 PCTFREE 10
 INITRANS 1
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5261,8 +5261,8 @@ CREATE INDEX "IDX_QRTZ_FT_INST_JOB_REQ_RCVRY"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5278,8 +5278,8 @@ CREATE INDEX "IDX_QRTZ_FT_JG"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5293,8 +5293,8 @@ CREATE INDEX "IDX_QRTZ_FT_J_G"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5308,8 +5308,8 @@ CREATE INDEX "IDX_QRTZ_FT_TG"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5344,8 +5344,8 @@ CREATE INDEX "IDX_QRTZ_J_GRP"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5361,8 +5361,8 @@ CREATE INDEX "IDX_QRTZ_J_REQ_RECOVERY"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5484,8 +5484,8 @@ CREATE INDEX "IDX_QRTZ_T_C"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5501,8 +5501,8 @@ CREATE INDEX "IDX_QRTZ_T_J"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5518,8 +5518,8 @@ CREATE INDEX "IDX_QRTZ_T_JG"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5533,8 +5533,8 @@ CREATE INDEX "IDX_QRTZ_T_NEXT_FIRE_TIME"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5548,8 +5548,8 @@ CREATE INDEX "IDX_QRTZ_T_NFT_ST"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5565,8 +5565,8 @@ CREATE INDEX "IDX_QRTZ_T_NFT_ST_MISFIRE"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1
@@ -5580,8 +5580,8 @@ CREATE INDEX "IDX_QRTZ_T_STATE"
 PCTFREE 10
 INITRANS 2
 STORAGE (
-  INITIAL 65536 
-  NEXT 1048576 
+  INITIAL 65536
+  NEXT 1048576
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1

+ 57 - 57
sql/postgresql/ruoyi-vue-pro.sql

@@ -20,7 +20,7 @@
 -- Sequence structure for act_evt_log_log_nr__seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "act_evt_log_log_nr__seq";
-CREATE SEQUENCE "act_evt_log_log_nr__seq" 
+CREATE SEQUENCE "act_evt_log_log_nr__seq"
 INCREMENT 1
 MINVALUE  1
 MAXVALUE 2147483647
@@ -31,7 +31,7 @@ CACHE 1;
 -- Sequence structure for act_hi_tsk_log_id__seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "act_hi_tsk_log_id__seq";
-CREATE SEQUENCE "act_hi_tsk_log_id__seq" 
+CREATE SEQUENCE "act_hi_tsk_log_id__seq"
 INCREMENT 1
 MINVALUE  1
 MAXVALUE 2147483647
@@ -42,7 +42,7 @@ CACHE 1;
 -- Sequence structure for bpm_form_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_form_seq";
-CREATE SEQUENCE "bpm_form_seq" 
+CREATE SEQUENCE "bpm_form_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -51,7 +51,7 @@ CACHE 1;
 -- Sequence structure for bpm_oa_leave_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_oa_leave_seq";
-CREATE SEQUENCE "bpm_oa_leave_seq" 
+CREATE SEQUENCE "bpm_oa_leave_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -60,7 +60,7 @@ CACHE 1;
 -- Sequence structure for bpm_process_definition_ext_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_process_definition_ext_seq";
-CREATE SEQUENCE "bpm_process_definition_ext_seq" 
+CREATE SEQUENCE "bpm_process_definition_ext_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -69,7 +69,7 @@ CACHE 1;
 -- Sequence structure for bpm_process_instance_ext_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_process_instance_ext_seq";
-CREATE SEQUENCE "bpm_process_instance_ext_seq" 
+CREATE SEQUENCE "bpm_process_instance_ext_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -78,7 +78,7 @@ CACHE 1;
 -- Sequence structure for bpm_task_assign_rule_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_task_assign_rule_seq";
-CREATE SEQUENCE "bpm_task_assign_rule_seq" 
+CREATE SEQUENCE "bpm_task_assign_rule_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -87,7 +87,7 @@ CACHE 1;
 -- Sequence structure for bpm_task_ext_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_task_ext_seq";
-CREATE SEQUENCE "bpm_task_ext_seq" 
+CREATE SEQUENCE "bpm_task_ext_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -96,7 +96,7 @@ CACHE 1;
 -- Sequence structure for bpm_user_group_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "bpm_user_group_seq";
-CREATE SEQUENCE "bpm_user_group_seq" 
+CREATE SEQUENCE "bpm_user_group_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -105,7 +105,7 @@ CACHE 1;
 -- Sequence structure for infra_api_access_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_api_access_log_seq";
-CREATE SEQUENCE "infra_api_access_log_seq" 
+CREATE SEQUENCE "infra_api_access_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -114,7 +114,7 @@ CACHE 1;
 -- Sequence structure for infra_api_error_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_api_error_log_seq";
-CREATE SEQUENCE "infra_api_error_log_seq" 
+CREATE SEQUENCE "infra_api_error_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -123,7 +123,7 @@ CACHE 1;
 -- Sequence structure for infra_codegen_column_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_codegen_column_seq";
-CREATE SEQUENCE "infra_codegen_column_seq" 
+CREATE SEQUENCE "infra_codegen_column_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -132,7 +132,7 @@ CACHE 1;
 -- Sequence structure for infra_codegen_table_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_codegen_table_seq";
-CREATE SEQUENCE "infra_codegen_table_seq" 
+CREATE SEQUENCE "infra_codegen_table_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -141,7 +141,7 @@ CACHE 1;
 -- Sequence structure for infra_config_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_config_seq";
-CREATE SEQUENCE "infra_config_seq" 
+CREATE SEQUENCE "infra_config_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -150,7 +150,7 @@ CACHE 1;
 -- Sequence structure for infra_data_source_config_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_data_source_config_seq";
-CREATE SEQUENCE "infra_data_source_config_seq" 
+CREATE SEQUENCE "infra_data_source_config_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -159,7 +159,7 @@ CACHE 1;
 -- Sequence structure for infra_file_config_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_file_config_seq";
-CREATE SEQUENCE "infra_file_config_seq" 
+CREATE SEQUENCE "infra_file_config_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -168,7 +168,7 @@ CACHE 1;
 -- Sequence structure for infra_file_content_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_file_content_seq";
-CREATE SEQUENCE "infra_file_content_seq" 
+CREATE SEQUENCE "infra_file_content_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -177,7 +177,7 @@ CACHE 1;
 -- Sequence structure for infra_file_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_file_seq";
-CREATE SEQUENCE "infra_file_seq" 
+CREATE SEQUENCE "infra_file_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -186,7 +186,7 @@ CACHE 1;
 -- Sequence structure for infra_job_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_job_log_seq";
-CREATE SEQUENCE "infra_job_log_seq" 
+CREATE SEQUENCE "infra_job_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -195,7 +195,7 @@ CACHE 1;
 -- Sequence structure for infra_job_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_job_seq";
-CREATE SEQUENCE "infra_job_seq" 
+CREATE SEQUENCE "infra_job_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -204,7 +204,7 @@ CACHE 1;
 -- Sequence structure for infra_test_demo_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "infra_test_demo_seq";
-CREATE SEQUENCE "infra_test_demo_seq" 
+CREATE SEQUENCE "infra_test_demo_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -213,7 +213,7 @@ CACHE 1;
 -- Sequence structure for member_user_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "member_user_seq";
-CREATE SEQUENCE "member_user_seq" 
+CREATE SEQUENCE "member_user_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -222,7 +222,7 @@ CACHE 1;
 -- Sequence structure for pay_app_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_app_seq";
-CREATE SEQUENCE "pay_app_seq" 
+CREATE SEQUENCE "pay_app_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -231,7 +231,7 @@ CACHE 1;
 -- Sequence structure for pay_channel_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_channel_seq";
-CREATE SEQUENCE "pay_channel_seq" 
+CREATE SEQUENCE "pay_channel_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -240,7 +240,7 @@ CACHE 1;
 -- Sequence structure for pay_merchant_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_merchant_seq";
-CREATE SEQUENCE "pay_merchant_seq" 
+CREATE SEQUENCE "pay_merchant_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -249,7 +249,7 @@ CACHE 1;
 -- Sequence structure for pay_notify_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_notify_log_seq";
-CREATE SEQUENCE "pay_notify_log_seq" 
+CREATE SEQUENCE "pay_notify_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -258,7 +258,7 @@ CACHE 1;
 -- Sequence structure for pay_notify_task_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_notify_task_seq";
-CREATE SEQUENCE "pay_notify_task_seq" 
+CREATE SEQUENCE "pay_notify_task_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -267,7 +267,7 @@ CACHE 1;
 -- Sequence structure for pay_order_extension_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_order_extension_seq";
-CREATE SEQUENCE "pay_order_extension_seq" 
+CREATE SEQUENCE "pay_order_extension_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -276,7 +276,7 @@ CACHE 1;
 -- Sequence structure for pay_order_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_order_seq";
-CREATE SEQUENCE "pay_order_seq" 
+CREATE SEQUENCE "pay_order_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -285,7 +285,7 @@ CACHE 1;
 -- Sequence structure for pay_refund_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "pay_refund_seq";
-CREATE SEQUENCE "pay_refund_seq" 
+CREATE SEQUENCE "pay_refund_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -294,7 +294,7 @@ CACHE 1;
 -- Sequence structure for system_dept_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_dept_seq";
-CREATE SEQUENCE "system_dept_seq" 
+CREATE SEQUENCE "system_dept_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -303,7 +303,7 @@ CACHE 1;
 -- Sequence structure for system_dict_data_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_dict_data_seq";
-CREATE SEQUENCE "system_dict_data_seq" 
+CREATE SEQUENCE "system_dict_data_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -312,7 +312,7 @@ CACHE 1;
 -- Sequence structure for system_dict_type_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_dict_type_seq";
-CREATE SEQUENCE "system_dict_type_seq" 
+CREATE SEQUENCE "system_dict_type_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -321,7 +321,7 @@ CACHE 1;
 -- Sequence structure for system_error_code_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_error_code_seq";
-CREATE SEQUENCE "system_error_code_seq" 
+CREATE SEQUENCE "system_error_code_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -330,7 +330,7 @@ CACHE 1;
 -- Sequence structure for system_login_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_login_log_seq";
-CREATE SEQUENCE "system_login_log_seq" 
+CREATE SEQUENCE "system_login_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -339,7 +339,7 @@ CACHE 1;
 -- Sequence structure for system_menu_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_menu_seq";
-CREATE SEQUENCE "system_menu_seq" 
+CREATE SEQUENCE "system_menu_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -348,7 +348,7 @@ CACHE 1;
 -- Sequence structure for system_notice_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_notice_seq";
-CREATE SEQUENCE "system_notice_seq" 
+CREATE SEQUENCE "system_notice_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -357,7 +357,7 @@ CACHE 1;
 -- Sequence structure for system_oauth2_access_token_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_oauth2_access_token_seq";
-CREATE SEQUENCE "system_oauth2_access_token_seq" 
+CREATE SEQUENCE "system_oauth2_access_token_seq"
 INCREMENT 1
 MINVALUE  1
 MAXVALUE 9223372036854775807
@@ -368,7 +368,7 @@ CACHE 1;
 -- Sequence structure for system_oauth2_client_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_oauth2_client_seq";
-CREATE SEQUENCE "system_oauth2_client_seq" 
+CREATE SEQUENCE "system_oauth2_client_seq"
 INCREMENT 1
 MINVALUE  1
 MAXVALUE 9223372036854775807
@@ -379,7 +379,7 @@ CACHE 1;
 -- Sequence structure for system_oauth2_refresh_token_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_oauth2_refresh_token_seq";
-CREATE SEQUENCE "system_oauth2_refresh_token_seq" 
+CREATE SEQUENCE "system_oauth2_refresh_token_seq"
 INCREMENT 1
 MINVALUE  1
 MAXVALUE 9223372036854775807
@@ -390,7 +390,7 @@ CACHE 1;
 -- Sequence structure for system_operate_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_operate_log_seq";
-CREATE SEQUENCE "system_operate_log_seq" 
+CREATE SEQUENCE "system_operate_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -399,7 +399,7 @@ CACHE 1;
 -- Sequence structure for system_post_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_post_seq";
-CREATE SEQUENCE "system_post_seq" 
+CREATE SEQUENCE "system_post_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -408,7 +408,7 @@ CACHE 1;
 -- Sequence structure for system_role_menu_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_role_menu_seq";
-CREATE SEQUENCE "system_role_menu_seq" 
+CREATE SEQUENCE "system_role_menu_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -417,7 +417,7 @@ CACHE 1;
 -- Sequence structure for system_role_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_role_seq";
-CREATE SEQUENCE "system_role_seq" 
+CREATE SEQUENCE "system_role_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -426,7 +426,7 @@ CACHE 1;
 -- Sequence structure for system_sensitive_word_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_sensitive_word_seq";
-CREATE SEQUENCE "system_sensitive_word_seq" 
+CREATE SEQUENCE "system_sensitive_word_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -435,7 +435,7 @@ CACHE 1;
 -- Sequence structure for system_sms_channel_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_sms_channel_seq";
-CREATE SEQUENCE "system_sms_channel_seq" 
+CREATE SEQUENCE "system_sms_channel_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -444,7 +444,7 @@ CACHE 1;
 -- Sequence structure for system_sms_code_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_sms_code_seq";
-CREATE SEQUENCE "system_sms_code_seq" 
+CREATE SEQUENCE "system_sms_code_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -453,7 +453,7 @@ CACHE 1;
 -- Sequence structure for system_sms_log_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_sms_log_seq";
-CREATE SEQUENCE "system_sms_log_seq" 
+CREATE SEQUENCE "system_sms_log_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -462,7 +462,7 @@ CACHE 1;
 -- Sequence structure for system_sms_template_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_sms_template_seq";
-CREATE SEQUENCE "system_sms_template_seq" 
+CREATE SEQUENCE "system_sms_template_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -471,7 +471,7 @@ CACHE 1;
 -- Sequence structure for system_social_user_bind_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_social_user_bind_seq";
-CREATE SEQUENCE "system_social_user_bind_seq" 
+CREATE SEQUENCE "system_social_user_bind_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -480,7 +480,7 @@ CACHE 1;
 -- Sequence structure for system_social_user_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_social_user_seq";
-CREATE SEQUENCE "system_social_user_seq" 
+CREATE SEQUENCE "system_social_user_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -489,7 +489,7 @@ CACHE 1;
 -- Sequence structure for system_tenant_package_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_tenant_package_seq";
-CREATE SEQUENCE "system_tenant_package_seq" 
+CREATE SEQUENCE "system_tenant_package_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -498,7 +498,7 @@ CACHE 1;
 -- Sequence structure for system_tenant_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_tenant_seq";
-CREATE SEQUENCE "system_tenant_seq" 
+CREATE SEQUENCE "system_tenant_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -507,7 +507,7 @@ CACHE 1;
 -- Sequence structure for system_user_post_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_user_post_seq";
-CREATE SEQUENCE "system_user_post_seq" 
+CREATE SEQUENCE "system_user_post_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -516,7 +516,7 @@ CACHE 1;
 -- Sequence structure for system_user_role_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_user_role_seq";
-CREATE SEQUENCE "system_user_role_seq" 
+CREATE SEQUENCE "system_user_role_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -525,7 +525,7 @@ CACHE 1;
 -- Sequence structure for system_user_seq
 -- ----------------------------
 DROP SEQUENCE IF EXISTS "system_user_seq";
-CREATE SEQUENCE "system_user_seq" 
+CREATE SEQUENCE "system_user_seq"
 INCREMENT 1
 MAXVALUE 9223372036854775807
 CACHE 1;
@@ -3470,7 +3470,7 @@ COMMENT ON TABLE "system_oauth2_client" IS 'OAuth2 客户端表';
 -- Records of system_oauth2_client
 -- ----------------------------
 BEGIN;
-INSERT INTO "system_oauth2_client" ("id", "client_id", "secret", "name", "logo", "description", "status", "access_token_validity_seconds", "refresh_token_validity_seconds", "redirect_uris", "auto_approve", "authorized_grant_types", "scopes", "authorities", "resource_ids", "additional_information", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 180, 8640, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '1', '["password","authorization_code","implicit","refresh_token"]', '["user_info"]', '["system:user:query"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2022-05-12 01:00:20', 0);
+INSERT INTO "system_oauth2_client" ("id", "client_id", "secret", "name", "logo", "description", "status", "access_token_validity_seconds", "refresh_token_validity_seconds", "redirect_uris", "auto_approve", "authorized_grant_types", "scopes", "authorities", "resource_ids", "additional_information", "creator", "create_time", "updater", "update_time", "deleted") VALUES (1, 'default', 'admin123', '芋道源码', 'http://test.yudao.iocoder.cn/a5e2e244368878a366b516805a4aabf1.png', '我是描述', 0, 999999999, 8640, '["https://www.iocoder.cn","https://doc.iocoder.cn"]', '1', '["password","authorization_code","implicit","refresh_token"]', '["user_info"]', '["system:user:query"]', '[]', '{}', '1', '2022-05-11 21:47:12', '1', '2022-05-12 01:00:20', 0);
 INSERT INTO "system_oauth2_client" ("id", "client_id", "secret", "name", "logo", "description", "status", "access_token_validity_seconds", "refresh_token_validity_seconds", "redirect_uris", "auto_approve", "authorized_grant_types", "scopes", "authorities", "resource_ids", "additional_information", "creator", "create_time", "updater", "update_time", "deleted") VALUES (40, 'test', 'test2', 'biubiu', 'http://test.yudao.iocoder.cn/277a899d573723f1fcdfb57340f00379.png', NULL, 0, 1800, 43200, '["https://www.iocoder.cn"]', 'true', '["password","authorization_code","implicit"]', '[]', '[]', '[]', '{}', '1', '2022-05-12 00:28:20', '1', '2022-05-13 01:04:21.023', 0);
 COMMIT;
 

Fișier diff suprimat deoarece este prea mare
+ 1 - 3536
sql/sqlserver/ruoyi-vue-pro.sql


+ 8 - 0
yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml

@@ -58,6 +58,14 @@
             <groupId>com.baomidou</groupId>
             <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <!-- 多数据源 -->
         </dependency>
+
+        <!-- 工具类相关 -->
+        <dependency>
+            <groupId>com.github.ulisesbocchio</groupId>
+            <artifactId>jasypt-spring-boot-starter</artifactId> <!-- 加解密 -->
+            <optional>true</optional>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 70 - 0
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/type/EncryptTypeHandler.java

@@ -0,0 +1,70 @@
+package cn.iocoder.yudao.framework.mybatis.core.type;
+
+import cn.hutool.core.lang.Assert;
+import cn.hutool.extra.spring.SpringUtil;
+import org.apache.ibatis.type.BaseTypeHandler;
+import org.apache.ibatis.type.JdbcType;
+import org.jasypt.encryption.StringEncryptor;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * 字段字段的 TypeHandler 实现类,基于 {@link StringEncryptor} 实现
+ * 可通过 jasypt.encryptor.password 配置项,设置密钥
+ *
+ * @author 芋道源码
+ */
+public class EncryptTypeHandler extends BaseTypeHandler<String> {
+
+    private static StringEncryptor encryptor;
+
+    @Override
+    public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException {
+        ps.setString(i, getEncryptor().encrypt(parameter));
+    }
+
+    @Override
+    public String getNullableResult(ResultSet rs, String columnName) throws SQLException {
+        String value = rs.getString(columnName);
+        return decrypt(value);
+    }
+
+    @Override
+    public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
+        String value = rs.getString(columnIndex);
+        return decrypt(value);
+    }
+
+    @Override
+    public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
+        String value = cs.getString(columnIndex);
+        return decrypt(value);
+    }
+
+    private static String decrypt(String value) {
+        if (value == null) {
+            return null;
+        }
+        return getEncryptor().decrypt(value);
+    }
+
+    public static String encrypt(String rawValue) {
+        if (rawValue == null) {
+            return null;
+        }
+        return getEncryptor().encrypt(rawValue);
+    }
+
+    private static StringEncryptor getEncryptor() {
+        if (encryptor != null) {
+            return encryptor;
+        }
+        encryptor = SpringUtil.getBean(StringEncryptor.class);
+        Assert.notNull(encryptor, "StringEncryptor 不能为空");
+        return encryptor;
+    }
+
+}

+ 1 - 1
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/type/StringLiSTTypeHandler.java → yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/type/StringListTypeHandler.java

@@ -21,7 +21,7 @@ import java.util.List;
  */
 @MappedJdbcTypes(JdbcType.VARCHAR)
 @MappedTypes(List.class)
-public class StringLiSTTypeHandler implements TypeHandler<List<String>> {
+public class StringListTypeHandler implements TypeHandler<List<String>> {
 
     private static final String COMMA = ",";
 

+ 4 - 1
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/db/DataSourceConfigDO.java

@@ -1,7 +1,9 @@
 package cn.iocoder.yudao.module.infra.dal.dataobject.db;
 
 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+import cn.iocoder.yudao.framework.mybatis.core.type.EncryptTypeHandler;
 import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 
@@ -10,7 +12,7 @@ import lombok.Data;
  *
  * @author 芋道源码
  */
-@TableName("infra_data_source_config")
+@TableName(value = "infra_data_source_config", autoResultMap = true)
 @KeySequence("infra_data_source_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
 @Data
 public class DataSourceConfigDO extends BaseDO {
@@ -40,6 +42,7 @@ public class DataSourceConfigDO extends BaseDO {
     /**
      * 密码
      */
+    @TableField(typeHandler = EncryptTypeHandler.class)
     private String password;
 
 }

+ 1 - 12
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DataSourceConfigServiceImpl.java

@@ -8,7 +8,6 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
 import cn.iocoder.yudao.module.infra.dal.mysql.db.DataSourceConfigMapper;
 import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
 import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
-import org.jasypt.encryption.StringEncryptor;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 
@@ -32,9 +31,6 @@ public class DataSourceConfigServiceImpl implements DataSourceConfigService {
     @Resource
     private DataSourceConfigMapper dataSourceConfigMapper;
 
-    @Resource
-    private StringEncryptor stringEncryptor;
-
     @Resource
     private DynamicDataSourceProperties dynamicDataSourceProperties;
 
@@ -44,7 +40,6 @@ public class DataSourceConfigServiceImpl implements DataSourceConfigService {
         checkConnectionOK(dataSourceConfig);
 
         // 插入
-        dataSourceConfig.setPassword(stringEncryptor.encrypt(createReqVO.getPassword()));
         dataSourceConfigMapper.insert(dataSourceConfig);
         // 返回
         return dataSourceConfig.getId();
@@ -58,7 +53,6 @@ public class DataSourceConfigServiceImpl implements DataSourceConfigService {
         checkConnectionOK(updateObj);
 
         // 更新
-        updateObj.setPassword(stringEncryptor.encrypt(updateObj.getPassword()));
         dataSourceConfigMapper.updateById(updateObj);
     }
 
@@ -83,12 +77,7 @@ public class DataSourceConfigServiceImpl implements DataSourceConfigService {
             return buildMasterDataSourceConfig();
         }
         // 从 DB 中读取
-        DataSourceConfigDO dataSourceConfig = dataSourceConfigMapper.selectById(id);
-        try {
-            dataSourceConfig.setPassword(stringEncryptor.decrypt(dataSourceConfig.getPassword()));
-        } catch (Exception ignore) { // 解码失败,则不解码
-        }
-        return dataSourceConfig;
+        return dataSourceConfigMapper.selectById(id);
     }
 
     @Override

+ 31 - 7
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/db/DataSourceConfigServiceImplTest.java

@@ -1,5 +1,7 @@
 package cn.iocoder.yudao.module.infra.service.db;
 
+import cn.hutool.core.util.ReflectUtil;
+import cn.iocoder.yudao.framework.mybatis.core.type.EncryptTypeHandler;
 import cn.iocoder.yudao.framework.mybatis.core.util.JdbcUtils;
 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
 import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigCreateReqVO;
@@ -8,8 +10,10 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
 import cn.iocoder.yudao.module.infra.dal.mysql.db.DataSourceConfigMapper;
 import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
 import org.jasypt.encryption.StringEncryptor;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.mockito.MockedStatic;
+import org.mockito.stubbing.Answer;
 import org.springframework.boot.test.mock.mockito.MockBean;
 import org.springframework.context.annotation.Import;
 
@@ -21,7 +25,10 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId
 import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
 import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.DATA_SOURCE_CONFIG_NOT_EXISTS;
 import static org.junit.jupiter.api.Assertions.*;
-import static org.mockito.Mockito.*;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mockStatic;
+import static org.mockito.Mockito.when;
 
 /**
  * {@link DataSourceConfigServiceImpl} 的单元测试类
@@ -43,13 +50,20 @@ public class DataSourceConfigServiceImplTest extends BaseDbUnitTest {
     @MockBean
     private DynamicDataSourceProperties dynamicDataSourceProperties;
 
+    @BeforeEach
+    public void setUp() {
+        // mock 一个空实现的 StringEncryptor,避免 EncryptTypeHandler 报错
+        ReflectUtil.setFieldValue(EncryptTypeHandler.class, "encryptor", stringEncryptor);
+        when(stringEncryptor.encrypt(anyString())).then((Answer<String>) invocation -> invocation.getArgument(0));
+        when(stringEncryptor.decrypt(anyString())).then((Answer<String>) invocation -> invocation.getArgument(0));
+    }
+
     @Test
     public void testCreateDataSourceConfig_success() {
         try (MockedStatic<JdbcUtils> databaseUtilsMock = mockStatic(JdbcUtils.class)) {
             // 准备参数
             DataSourceConfigCreateReqVO reqVO = randomPojo(DataSourceConfigCreateReqVO.class);
             // mock 方法
-            when(stringEncryptor.encrypt(eq(reqVO.getPassword()))).thenReturn("123456");
             databaseUtilsMock.when(() -> JdbcUtils.isConnectionOK(eq(reqVO.getUrl()),
                     eq(reqVO.getUsername()), eq(reqVO.getPassword()))).thenReturn(true);
 
@@ -59,8 +73,7 @@ public class DataSourceConfigServiceImplTest extends BaseDbUnitTest {
             assertNotNull(dataSourceConfigId);
             // 校验记录的属性是否正确
             DataSourceConfigDO dataSourceConfig = dataSourceConfigMapper.selectById(dataSourceConfigId);
-            assertPojoEquals(reqVO, dataSourceConfig, "password");
-            assertEquals("123456", dataSourceConfig.getPassword());
+            assertPojoEquals(reqVO, dataSourceConfig);
         }
     }
 
@@ -75,7 +88,7 @@ public class DataSourceConfigServiceImplTest extends BaseDbUnitTest {
                 o.setId(dbDataSourceConfig.getId()); // 设置更新的 ID
             });
             // mock 方法
-            when(stringEncryptor.encrypt(eq(reqVO.getPassword()))).thenReturn("123456");
+//            when(stringEncryptor.encrypt(eq(reqVO.getPassword()))).thenReturn("123456");
             databaseUtilsMock.when(() -> JdbcUtils.isConnectionOK(eq(reqVO.getUrl()),
                     eq(reqVO.getUsername()), eq(reqVO.getPassword()))).thenReturn(true);
 
@@ -83,8 +96,7 @@ public class DataSourceConfigServiceImplTest extends BaseDbUnitTest {
             dataSourceConfigService.updateDataSourceConfig(reqVO);
             // 校验是否更新正确
             DataSourceConfigDO dataSourceConfig = dataSourceConfigMapper.selectById(reqVO.getId()); // 获取最新的
-            assertPojoEquals(reqVO, dataSourceConfig, "password");
-            assertEquals("123456", dataSourceConfig.getPassword());
+            assertPojoEquals(reqVO, dataSourceConfig);
         }
     }
 
@@ -120,4 +132,16 @@ public class DataSourceConfigServiceImplTest extends BaseDbUnitTest {
         assertServiceException(() -> dataSourceConfigService.deleteDataSourceConfig(id), DATA_SOURCE_CONFIG_NOT_EXISTS);
     }
 
+    @Test // 测试使用 password 查询,可以查询到数据
+    public void testSelectPassword() {
+        // mock 数据
+        DataSourceConfigDO dbDataSourceConfig = randomPojo(DataSourceConfigDO.class);
+        dataSourceConfigMapper.insert(dbDataSourceConfig);// @Sql: 先插入出一条存在的数据
+
+        // 调用
+        DataSourceConfigDO result = dataSourceConfigMapper.selectOne(DataSourceConfigDO::getPassword,
+                EncryptTypeHandler.encrypt(dbDataSourceConfig.getPassword()));
+        System.out.println(result);
+    }
+
 }

+ 1 - 1
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java

@@ -100,7 +100,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
         }
 
         // 创建 Token 令牌,记录登录日志
-        return createTokenAfterLoginSuccess(user, null, LoginLogTypeEnum.LOGIN_SOCIAL);
+        return createTokenAfterLoginSuccess(user, user.getMobile(), LoginLogTypeEnum.LOGIN_SOCIAL);
     }
 
     @Override

+ 2 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sensitiveword/SensitiveWordDO.java

@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.system.dal.dataobject.sensitiveword;
 
 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
-import cn.iocoder.yudao.framework.mybatis.core.type.StringLiSTTypeHandler;
+import cn.iocoder.yudao.framework.mybatis.core.type.StringListTypeHandler;
 import com.baomidou.mybatisplus.annotation.KeySequence;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -46,7 +46,7 @@ public class SensitiveWordDO extends BaseDO {
      * 例如说,tag 有短信、论坛两种,敏感词 "推广" 在短信下是敏感词,在论坛下不是敏感词。
      * 此时,我们会存储一条敏感词记录,它的 name 为"推广",tag 为短信。
      */
-    @TableField(typeHandler = StringLiSTTypeHandler.class)
+    @TableField(typeHandler = StringListTypeHandler.class)
     private List<String> tags;
     /**
      * 状态

+ 2 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/PostMapper.java

@@ -24,7 +24,8 @@ public interface PostMapper extends BaseMapperX<PostDO> {
         return selectPage(reqVO, new QueryWrapperX<PostDO>()
                 .likeIfPresent("code", reqVO.getCode())
                 .likeIfPresent("name", reqVO.getName())
-                .eqIfPresent("status", reqVO.getStatus()));
+                .eqIfPresent("status", reqVO.getStatus())
+                .orderByDesc("id"));
     }
 
     default List<PostDO> selectList(PostExportReqVO reqVO) {

+ 1 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/DictDataMapper.java

@@ -37,7 +37,7 @@ public interface DictDataMapper extends BaseMapperX<DictDataDO> {
                 .likeIfPresent(DictDataDO::getLabel, reqVO.getLabel())
                 .likeIfPresent(DictDataDO::getDictType, reqVO.getDictType())
                 .eqIfPresent(DictDataDO::getStatus, reqVO.getStatus())
-                .orderByAsc(Arrays.asList(DictDataDO::getDictType, DictDataDO::getSort)));
+                .orderByDesc(Arrays.asList(DictDataDO::getDictType, DictDataDO::getSort)));
     }
 
     default List<DictDataDO> selectList(DictDataExportReqVO reqVO) {

+ 3 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/DictTypeMapper.java

@@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
 import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
 import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeExportReqVO;
 import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO;
+import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
 import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -18,7 +19,8 @@ public interface DictTypeMapper extends BaseMapperX<DictTypeDO> {
                 .likeIfPresent(DictTypeDO::getName, reqVO.getName())
                 .likeIfPresent(DictTypeDO::getType, reqVO.getType())
                 .eqIfPresent(DictTypeDO::getStatus, reqVO.getStatus())
-                .betweenIfPresent(DictTypeDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()));
+                .betweenIfPresent(DictTypeDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
+                .orderByDesc(DictTypeDO::getId));
     }
 
     default List<DictTypeDO> selectList(DictTypeExportReqVO reqVO) {

+ 1 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/ErrorCodeMapper.java

@@ -23,7 +23,7 @@ public interface ErrorCodeMapper extends BaseMapperX<ErrorCodeDO> {
                 .eqIfPresent("code", reqVO.getCode())
                 .likeIfPresent("message", reqVO.getMessage())
                 .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
-                .orderByAsc("application_name", "code"));
+                .orderByDesc("code"));
     }
 
     default List<ErrorCodeDO> selectList(ErrorCodeExportReqVO reqVO) {

+ 2 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notice/NoticeMapper.java

@@ -13,7 +13,8 @@ public interface NoticeMapper extends BaseMapperX<NoticeDO> {
     default PageResult<NoticeDO> selectPage(NoticePageReqVO reqVO) {
         return selectPage(reqVO, new LambdaQueryWrapperX<NoticeDO>()
                 .likeIfPresent(NoticeDO::getTitle, reqVO.getTitle())
-                .eqIfPresent(NoticeDO::getStatus, reqVO.getStatus()));
+                .eqIfPresent(NoticeDO::getStatus, reqVO.getStatus())
+                .orderByDesc(NoticeDO::getId));
     }
 
 }

+ 2 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/RoleMapper.java

@@ -23,7 +23,8 @@ public interface RoleMapper extends BaseMapperX<RoleDO> {
                 .likeIfPresent(RoleDO::getName, reqVO.getName())
                 .likeIfPresent(RoleDO::getCode, reqVO.getCode())
                 .eqIfPresent(RoleDO::getStatus, reqVO.getStatus())
-                .betweenIfPresent(BaseDO::getCreateTime, reqVO.getBeginTime(), reqVO.getEndTime()));
+                .betweenIfPresent(BaseDO::getCreateTime, reqVO.getBeginTime(), reqVO.getEndTime())
+                .orderByDesc(RoleDO::getId));
     }
 
     default List<RoleDO> selectList(RoleExportReqVO reqVO) {

+ 4 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java

@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.user;
 
 import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserExportReqVO;
 import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
+import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO;
 import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
@@ -33,7 +34,9 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
                 .likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile())
                 .eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus())
                 .betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getBeginTime(), reqVO.getEndTime())
-                .inIfPresent(AdminUserDO::getDeptId, deptIds));
+                .inIfPresent(AdminUserDO::getDeptId, deptIds)
+                .orderByDesc(AdminUserDO::getId));
+
     }
 
     default List<AdminUserDO> selectList(UserExportReqVO reqVO, Collection<Long> deptIds) {

+ 1 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java

@@ -181,7 +181,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
         }
 
         // 创建 Token 令牌,记录登录日志
-        return createTokenAfterLoginSuccess(user.getId(), null, LoginLogTypeEnum.LOGIN_SOCIAL);
+        return createTokenAfterLoginSuccess(user.getId(), user.getUsername(), LoginLogTypeEnum.LOGIN_SOCIAL);
     }
 
     @Override

+ 8 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java

@@ -8,8 +8,8 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
 import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
 import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
 import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
-import cn.iocoder.yudao.module.system.api.permission.dto.DeptDataPermissionRespDTO;
 import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
+import cn.iocoder.yudao.module.system.api.permission.dto.DeptDataPermissionRespDTO;
 import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
 import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
 import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
@@ -248,7 +248,12 @@ public class PermissionServiceImpl implements PermissionService {
 
     @Override
     public Set<Long> getUserRoleIdsFromCache(Long userId, Collection<Integer> roleStatuses) {
-        Set<Long> roleIds = new HashSet<>(userRoleCache.get(userId));
+        Set<Long> cacheRoleIds = userRoleCache.get(userId);
+        // 创建用户的时候没有分配角色,会存在空指针异常
+        if (CollUtil.isEmpty(cacheRoleIds)) {
+            return Collections.emptySet();
+        }
+        Set<Long> roleIds = new HashSet<>(cacheRoleIds);
         // 过滤角色状态
         if (CollectionUtil.isNotEmpty(roleStatuses)) {
             roleIds.removeIf(roleId -> {
@@ -451,6 +456,7 @@ public class PermissionServiceImpl implements PermissionService {
 
     @Override
     @DataPermission(enable = false) // 关闭数据权限,不然就会出现递归获取数据权限的问题
+    @TenantIgnore // 忽略多租户的自动过滤。如果不忽略,会导致添加租户时,因为切换租户,导致获取不到 User。即使忽略,本身该方法不存在跨租户的操作,不会存在问题。
     public DeptDataPermissionRespDTO getDeptDataPermission(Long userId) {
         DeptDataPermissionRespDTO result = new DeptDataPermissionRespDTO();
         // 获得用户的角色

+ 3 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java

@@ -215,6 +215,9 @@ public class RoleServiceImpl implements RoleService {
 
     @Override
     public List<RoleDO> getRoles(@Nullable Collection<Integer> statuses) {
+        if (CollUtil.isEmpty(statuses)) {
+    		return roleMapper.selectList();
+		}
         return roleMapper.selectListByStatus(statuses);
     }
 

+ 36 - 0
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/core/TipApplicationRunner.java

@@ -0,0 +1,36 @@
+package cn.iocoder.yudao.server.framework.tip.core;
+
+import cn.hutool.core.thread.ThreadUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 项目启动成功后,提供文档相关的地址
+ */
+@Component
+@Slf4j
+public class TipApplicationRunner implements ApplicationRunner {
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        ThreadUtil.execute(() -> {
+            ThreadUtil.sleep(1, TimeUnit.SECONDS); // 延迟 1 秒,保证输出到结尾
+            log.info("\n----------------------------------------------------------\n\t" +
+                            "项目启动成功!\n\t" +
+                            "接口文档: \t{} \n\t" +
+                            "开发文档: \t{} \n\t" +
+                            "视频教程: \t{} \n\t" +
+                            "源码解析: \t{} \n" +
+                            "----------------------------------------------------------",
+                    "https://doc.iocoder.cn/api-doc/",
+                    "https://doc.iocoder.cn",
+                    "https://t.zsxq.com/02Yf6M7Qn",
+                    "https://t.zsxq.com/02B6ujIee");
+        });
+    }
+
+}

+ 4 - 0
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/package-info.java

@@ -0,0 +1,4 @@
+/**
+ * 目的:项目启动成功后,提供文档相关的地址
+ */
+package cn.iocoder.yudao.server.framework.tip;

+ 0 - 4
yudao-server/src/main/java/cn/iocoder/yudao/server/framework/ui/core/package-info.java

@@ -1,4 +0,0 @@
-/**
- * 占位
- */
-package cn.iocoder.yudao.server.framework.ui.core;

BIN
yudao-server/src/main/resources/admin-ui/static/img/bg-mobile.0e3df208.png


BIN
yudao-server/src/main/resources/admin-ui/static/img/bg.9bed9548.png


BIN
yudao-server/src/main/resources/admin-ui/static/img/pic.49137f73.png


BIN
yudao-server/src/main/resources/admin-ui/static/img/profile.2a8ee7b7.jpg


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/10.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/10.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/11.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/11.js.gz


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/12.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/12.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/13.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/13.js.gz


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/14.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/14.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/15.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/15.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/16.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/16.js.gz


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/17.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/17.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/18.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/18.js.gz


Fișier diff suprimat deoarece este prea mare
+ 51 - 0
yudao-server/src/main/resources/admin-ui/static/js/2.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/2.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/20.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/20.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/21.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/21.js.gz


Fișier diff suprimat deoarece este prea mare
+ 8 - 8
yudao-server/src/main/resources/admin-ui/static/js/4.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/4.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/5.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/5.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/6.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/6.js.gz


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/7.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/7.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/8.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/8.js.gz


Fișier diff suprimat deoarece este prea mare
+ 2 - 2
yudao-server/src/main/resources/admin-ui/static/js/9.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/9.js.gz


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
yudao-server/src/main/resources/admin-ui/static/js/app.js


BIN
yudao-server/src/main/resources/admin-ui/static/js/app.js.gz


+ 4 - 0
yudao-ui-admin/.npmrc

@@ -0,0 +1,4 @@
+phantomjs_cdnurl=http://cnpmjs.org/downloads
+chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
+sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
+registry=https://registry.npmmirror.com

+ 7 - 6
yudao-ui-admin/package.json

@@ -12,7 +12,8 @@
     "build:dev": "vue-cli-service build --mode dev",
     "build:demo1024": "vue-cli-service build --mode demo1024",
     "preview": "node build/index.js --preview",
-    "lint": "eslint --ext .js,.vue src"
+    "lint": "eslint --ext .js,.vue src",
+    "clean": "rimraf node_modules"
   },
   "husky": {
     "hooks": {
@@ -62,11 +63,11 @@
     "vue-router": "3.4.9",
     "vuedraggable": "2.24.3",
     "vuex": "3.6.0",
-    "bpmn-js-token-simulation": "^0.10.0",
-    "min-dash": "^3.5.2",
-    "xml-js": "^1.6.11",
-    "@babel/parser": "^7.7.4",
-    "throttle-debounce": "^2.1.0"
+    "bpmn-js-token-simulation": "0.10.0",
+    "min-dash": "3.5.2",
+    "xml-js": "1.6.11",
+    "@babel/parser": "7.7.4",
+    "throttle-debounce": "2.1.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "4.4.6",

+ 2 - 1
yudao-ui-admin/src/components/generator/config.js

@@ -499,7 +499,8 @@ export const selectComponents = [
     __slot__: {
       'list-type': true
     },
-    action: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
+    // action: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
+    action: '/infra/file/upload', // 请求地址
     disabled: false,
     accept: '',
     name: 'file',

+ 42 - 0
yudao-ui-admin/src/components/parser/Parser.vue

@@ -1,6 +1,7 @@
 <script>
 import { deepClone } from '@/utils/index'
 import render from '@/components/render/render.js'
+import {getAccessToken} from "@/utils/auth";
 
 const ruleTrigger = {
   'el-input': 'blur',
@@ -79,10 +80,51 @@ function formBtns(h) {
 }
 
 function renderFormItem(h, elementList) {
+  const that = this
+  const data = this[this.formConf.formModel]
+  // const formRef = that.$refs[that.formConf.formRef] // 这里直接添加有问题,此时还找不到表单 $refs
   return elementList.map(scheme => {
     const config = scheme.__config__
     const layout = layouts[config.layout]
 
+    // edit by 芋道源码,解决 el-upload 上传的问题
+    // 参考 https://github.com/JakHuang/form-generator/blob/master/src/components/parser/example/Index.vue 实现
+    const vModel = scheme.__vModel__
+    const val = data[vModel]
+    if (scheme.__config__.tag === 'el-upload') {
+      // 回显图片
+      scheme['file-list'] = (val || []).map(url => ({ name: url, url }))
+      // 上传地址 + 请求头
+      scheme.action = process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload"
+      scheme.headers = { Authorization: "Bearer " + getAccessToken() }
+      // 注意 on-success 不能绑定箭头函数!!!
+      scheme['on-success'] = function (response, file, fileList) {
+        if (response.code !== 0) {
+          return;
+        }
+        // 添加到 data 中
+        const prev = data[vModel] || []
+        this.$set(data, vModel, [
+          ...prev,
+          response.data
+        ])
+        // 发起表单校验
+        that.$refs[that.formConf.formRef].validateField(vModel)
+      }
+      // 注意 on-remove 不能绑定箭头函数!!!
+      scheme['on-remove'] = function (file, fileList) {
+        // 移除从 data 中
+        const prev = data[vModel] || []
+        const index = prev.indexOf(file.response.data)
+        if (index === -1) {
+          return
+        }
+        prev.splice(index, 1) // 直接移除即可,无需重复 set,因为 array 是引用
+        // 发起表单校验
+        that.$refs[that.formConf.formRef].validateField(vModel)
+      }
+    }
+
     if (layout) {
       return layout.call(this, h, scheme)
     }

+ 6 - 13
yudao-ui-admin/src/layout/components/TagsView/index.vue

@@ -152,31 +152,24 @@ export default {
       })
     },
     refreshSelectedTag(view) {
-      this.$store.dispatch('tagsView/delCachedView', view).then(() => {
-        const { fullPath } = view
-        this.$nextTick(() => {
-          this.$router.replace({
-            path: '/redirect' + fullPath
-          })
-        })
-      })
+      this.$tab.refreshPage(view);
     },
     closeSelectedTag(view) {
-      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+      this.$tab.closePage(view).then(({ visitedViews }) => {
         if (this.isActive(view)) {
           this.toLastView(visitedViews, view)
         }
       })
     },
     closeRightTags() {
-      this.$store.dispatch('tagsView/delRightTags', this.selectedTag).then(visitedViews => {
+      this.$tab.closeRightPage(this.selectedTag).then(visitedViews => {
         if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
           this.toLastView(visitedViews)
         }
       })
     },
     closeLeftTags() {
-      this.$store.dispatch('tagsView/delLeftTags', this.selectedTag).then(visitedViews => {
+      this.$tab.closeLeftPage(this.selectedTag).then(visitedViews => {
         if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
           this.toLastView(visitedViews)
         }
@@ -184,12 +177,12 @@ export default {
     },
     closeOthersTags() {
       this.$router.push(this.selectedTag).catch(()=>{});
-      this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {
+      this.$tab.closeOtherPage(this.selectedTag).then(() => {
         this.moveToCurrentTag()
       })
     },
     closeAllTags(view) {
-      this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => {
+      this.$tab.closeAllPage().then(({ visitedViews }) => {
         if (this.affixTags.some(tag => tag.path === this.$route.path)) {
           return
         }

+ 3 - 2
yudao-ui-admin/src/main.js

@@ -69,8 +69,9 @@ import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
 import Tinymce from '@/components/tinymce/index.vue'
 Vue.component('tinymce', Tinymce)
 import '@/icons'
-import axios from 'axios'
-Vue.prototype.$axios = axios
+import request from "@/utils/request" // 实现 form generator 使用自己定义的 axios request 对象
+console.log(request)
+Vue.prototype.$axios = request
 import '@/styles/index.scss'
 
 /**

+ 3 - 0
yudao-ui-admin/src/store/modules/permission.js

@@ -2,6 +2,7 @@ import { constantRoutes } from '@/router'
 import { getRouters } from '@/api/menu'
 import Layout from '@/layout/index'
 import ParentView from '@/components/ParentView';
+import { toCamelCase } from "@/utils";
 
 const permission = {
   state: {
@@ -56,6 +57,8 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
       icon: route.icon,
       noCache: !route.keepAlive,
     }
+    // 路由地址转首字母大写驼峰,作为路由名称,适配keepAlive
+    route.name = toCamelCase(route.path, true)
     route.hidden = !route.visible
     // 处理 component 属性
     if (route.children) { // 父节点

+ 26 - 2
yudao-ui-admin/src/store/modules/tagsView.js

@@ -63,7 +63,7 @@ const mutations = {
       }
     }
   },
-
+  
   DEL_RIGHT_VIEWS: (state, view) => {
     const index = state.visitedViews.findIndex(v => v.path === view.path)
     if (index === -1) {
@@ -79,6 +79,23 @@ const mutations = {
       }
       return false
     })
+  },
+
+  DEL_LEFT_VIEWS: (state, view) => {
+    const index = state.visitedViews.findIndex(v => v.path === view.path)
+    if (index === -1) {
+      return
+    }
+    state.visitedViews = state.visitedViews.filter((item, idx) => {
+      if (idx >= index || (item.meta && item.meta.affix)) {
+        return true
+      }
+      const i = state.cachedViews.indexOf(item.name)
+      if (i > -1) {
+        state.cachedViews.splice(i, 1)
+      }
+      return false
+    })
   }
 }
 
@@ -172,7 +189,14 @@ const actions = {
       commit('DEL_RIGHT_VIEWS', view)
       resolve([...state.visitedViews])
     })
-  }
+  },
+
+  delLeftTags({ commit }, view) {
+    return new Promise(resolve => {
+      commit('DEL_LEFT_VIEWS', view)
+      resolve([...state.visitedViews])
+    })
+  },
 }
 
 export default {

+ 81 - 7
yudao-ui-admin/src/utils/auth.js

@@ -1,22 +1,96 @@
-import Cookies from 'js-cookie'
+import {decrypt, encrypt} from "@/utils/jsencrypt";
 
 const AccessTokenKey = 'ACCESS_TOKEN'
 const RefreshTokenKey = 'REFRESH_TOKEN'
 
+// ========== Token 相关 ==========
+
 export function getAccessToken() {
-  return Cookies.get(AccessTokenKey)
+  return localStorage.getItem(AccessTokenKey)
 }
 
 export function getRefreshToken() {
-  return Cookies.get(RefreshTokenKey)
+  return localStorage.getItem(RefreshTokenKey)
 }
 
 export function setToken(token) {
-  Cookies.set(AccessTokenKey, token.accessToken)
-  Cookies.set(RefreshTokenKey, token.refreshToken)
+  localStorage.setItem(AccessTokenKey, token.accessToken)
+  localStorage.setItem(RefreshTokenKey, token.refreshToken)
 }
 
 export function removeToken() {
-  Cookies.remove(AccessTokenKey)
-  Cookies.remove(RefreshTokenKey)
+  localStorage.removeItem(AccessTokenKey)
+  localStorage.removeItem(RefreshTokenKey)
+}
+
+// ========== 账号相关 ==========
+
+const UsernameKey = 'USERNAME'
+const PasswordKey = 'PASSWORD'
+const RememberMeKey = 'REMEMBER_ME'
+
+export function getUsername() {
+  return localStorage.getItem(UsernameKey)
+}
+
+export function setUsername(username) {
+  localStorage.setItem(UsernameKey, username)
+}
+
+export function removeUsername() {
+  localStorage.removeItem(UsernameKey)
+}
+
+export function getPassword() {
+  const password = localStorage.getItem(PasswordKey)
+  return password ? decrypt(password) : undefined
+}
+
+export function setPassword(password) {
+  localStorage.setItem(PasswordKey, encrypt(password))
+}
+
+export function removePassword() {
+  localStorage.removeItem(PasswordKey)
+}
+
+export function getRememberMe() {
+  return localStorage.getItem(RememberMeKey) === 'true'
+}
+
+export function setRememberMe(rememberMe) {
+  localStorage.setItem(RememberMeKey, rememberMe)
+}
+
+export function removeRememberMe() {
+  localStorage.removeItem(RememberMeKey)
+}
+
+// ========== 租户相关 ==========
+
+const TenantIdKey = 'TENANT_ID'
+const TenantNameKey = 'TENANT_NAME'
+
+export function getTenantName() {
+  return localStorage.getItem(TenantNameKey)
+}
+
+export function setTenantName(username) {
+  localStorage.setItem(TenantNameKey, username)
+}
+
+export function removeTenantName() {
+  localStorage.removeItem(TenantNameKey)
+}
+
+export function getTenantId() {
+  return localStorage.getItem(TenantIdKey)
+}
+
+export function setTenantId(username) {
+  localStorage.setItem(TenantIdKey, username)
+}
+
+export function removeTenantId() {
+  localStorage.removeItem(TenantIdKey)
 }

+ 2 - 2
yudao-ui-admin/src/utils/constants.js

@@ -75,13 +75,13 @@ export const SystemUserSocialTypeEnum = {
     title: "钉钉",
     type: 20,
     source: "dingtalk",
-    img: "https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.11/dingtalk.png",
+    img: "https://s1.ax1x.com/2022/05/22/OzMDRs.png",
   },
   WECHAT_ENTERPRISE: {
     title: "企业微信",
     type: 30,
     source: "wechat_enterprise",
-    img: "https://cdn.jsdelivr.net/gh/justauth/justauth-oauth-logo@1.11/wechat_enterprise.png",
+    img: "https://s1.ax1x.com/2022/05/22/OzMrzn.png",
   }
 }
 

+ 12 - 0
yudao-ui-admin/src/utils/index.js

@@ -427,3 +427,15 @@ export function isNumberStr(str) {
   return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
 }
 
+// -转驼峰
+export function toCamelCase(str, upperCaseFirst) {
+  str = (str || '').toLowerCase().replace(/-(.)/g, function (match, group1) {
+    return group1.toUpperCase();
+  });
+
+  if (upperCaseFirst && str) {
+    str = str.charAt(0).toUpperCase() + str.slice(1);
+  }
+
+  return str;
+}

+ 83 - 77
yudao-ui-admin/src/utils/request.js

@@ -1,12 +1,17 @@
 import axios from 'axios'
-import { Notification, MessageBox, Message } from 'element-ui'
+import {Message, MessageBox, Notification} from 'element-ui'
 import store from '@/store'
-import {getAccessToken, getRefreshToken, setToken} from '@/utils/auth'
+import {getAccessToken, getRefreshToken, getTenantId, setToken} from '@/utils/auth'
 import errorCode from '@/utils/errorCode'
-import Cookies from "js-cookie";
 import {getPath, getTenantEnable} from "@/utils/ruoyi";
 import {refreshToken} from "@/api/login";
 
+// 需要忽略的提示。忽略后,自动 Promise.reject('error')
+const ignoreMsgs = [
+  "无效的刷新令牌", // 刷新令牌被删除时,不用提示
+  "刷新令牌已过期" // 使用刷新令牌,刷新获取新的访问令牌时,结果因为过期失败,此时需要忽略。否则,会导致继续 401,无法跳转到登出界面
+]
+
 // 是否显示重新登录
 export let isRelogin = { show: false };
 // Axios 无感知刷新令牌,参考 https://www.dashingdog.cn/article/11 与 https://segmentfault.com/a/1190000020210980 实现
@@ -21,7 +26,9 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: process.env.VUE_APP_BASE_API + '/admin-api/', // 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
   // 超时
-  timeout: 30000
+  timeout: 30000,
+  // 禁用 Cookie 等信息
+  withCredentials: false,
 })
 // request拦截器
 service.interceptors.request.use(config => {
@@ -32,7 +39,7 @@ service.interceptors.request.use(config => {
   }
   // 设置租户
   if (getTenantEnable()) {
-    const tenantId = Cookies.get('tenantId');
+    const tenantId = getTenantId();
     if (tenantId) {
       config.headers['tenant-id'] = tenantId;
     }
@@ -66,85 +73,84 @@ service.interceptors.request.use(config => {
 })
 
 // 响应拦截器
-service.interceptors.response.use( async res => {
-    // 未设置状态码则默认成功状态
-    const code = res.data.code || 200;
-    // 获取错误信息
-    const msg = errorCode[code] || res.data.msg || errorCode['default']
-    if (code === 401) {
-      // 如果未认证,并且未进行刷新令牌,说明可能是访问令牌过期了
-      if (!isRefreshToken) {
-        isRefreshToken = true;
-        // 1. 如果获取不到刷新令牌,则只能执行登出操作
-        if (!getRefreshToken()) {
-          return handleAuthorized();
-        }
-        // 2. 进行刷新访问令牌
-        try {
-          const refreshTokenRes = await refreshToken()
-          // 2.1 刷新成功,则回放队列的请求 + 当前请求
-          setToken(refreshTokenRes.data)
-          requestList.forEach(cb => cb())
-          return service(res.config)
-        } catch (e) {// 为什么需要 catch 异常呢?刷新失败时,请求因为 Promise.reject 触发异常。
-          // 2.2 刷新失败,只回放队列的请求
-          requestList.forEach(cb => cb())
-          // 提示是否要登出。即不回放当前请求!不然会形成递归
-          return handleAuthorized();
-        } finally {
-          requestList = []
-          isRefreshToken = false
-        }
-      } else {
-        // 添加到队列,等待刷新获取到新的令牌
-        return new Promise(resolve => {
-          requestList.push(() => {
-            res.config.headers['Authorization'] = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改
-            resolve(service(res.config))
-          })
-        })
+service.interceptors.response.use(async res => {
+  // 未设置状态码则默认成功状态
+  const code = res.data.code || 200;
+  // 获取错误信息
+  const msg = res.data.msg || errorCode[code] || errorCode['default']
+  if (ignoreMsgs.indexOf(msg) !== -1) { // 如果是忽略的错误码,直接返回 msg 异常
+    return Promise.reject(msg)
+  } else if (code === 401) {
+    // 如果未认证,并且未进行刷新令牌,说明可能是访问令牌过期了
+    if (!isRefreshToken) {
+      isRefreshToken = true;
+      // 1. 如果获取不到刷新令牌,则只能执行登出操作
+      if (!getRefreshToken()) {
+        return handleAuthorized();
       }
-    } else if (code === 500) {
-      Message({
-        message: msg,
-        type: 'error'
-      })
-      return Promise.reject(new Error(msg))
-    } else if (code === 901) {
-      Message({
-        type: 'error',
-        duration: 0,
-        dangerouslyUseHTMLString: true,
-        message: '<div>演示模式,无法进行写操作</div>'
-          + '<div> &nbsp; </div>'
-          + '<div>参考 https://doc.iocoder.cn/ 教程</div>'
-          + '<div> &nbsp; </div>'
-          + '<div>5 分钟搭建本地环境</div>',
-      })
-      return Promise.reject(new Error(msg))
-    } else if (code !== 200) {
-      if (msg === '无效的刷新令牌') { // hard coding:忽略这个提示,直接登出
-        console.log('无效的刷新令牌')
-      } else {
-        Notification.error({
-          title: msg
-        })
+      // 2. 进行刷新访问令牌
+      try {
+        const refreshTokenRes = await refreshToken()
+        // 2.1 刷新成功,则回放队列的请求 + 当前请求
+        setToken(refreshTokenRes.data)
+        requestList.forEach(cb => cb())
+        return service(res.config)
+      } catch (e) {// 为什么需要 catch 异常呢?刷新失败时,请求因为 Promise.reject 触发异常。
+        // 2.2 刷新失败,只回放队列的请求
+        requestList.forEach(cb => cb())
+        // 提示是否要登出。即不回放当前请求!不然会形成递归
+        return handleAuthorized();
+      } finally {
+        requestList = []
+        isRefreshToken = false
       }
-      return Promise.reject('error')
     } else {
-      return res.data
+      // 添加到队列,等待刷新获取到新的令牌
+      return new Promise(resolve => {
+        requestList.push(() => {
+          res.config.headers['Authorization'] = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改
+          resolve(service(res.config))
+        })
+      })
     }
-  },
-  error => {
+  } else if (code === 500) {
+    Message({
+      message: msg,
+      type: 'error'
+    })
+    return Promise.reject(new Error(msg))
+  } else if (code === 901) {
+    Message({
+      type: 'error',
+      duration: 0,
+      dangerouslyUseHTMLString: true,
+      message: '<div>演示模式,无法进行写操作</div>'
+        + '<div> &nbsp; </div>'
+        + '<div>参考 https://doc.iocoder.cn/ 教程</div>'
+        + '<div> &nbsp; </div>'
+        + '<div>5 分钟搭建本地环境</div>',
+    })
+    return Promise.reject(new Error(msg))
+  } else if (code !== 200) {
+    if (msg === '无效的刷新令牌') { // hard coding:忽略这个提示,直接登出
+      console.log(msg)
+    } else {
+      Notification.error({
+        title: msg
+      })
+    }
+    return Promise.reject('error')
+  } else {
+    return res.data
+  }
+}, error => {
     console.log('err' + error)
-    let { message } = error;
+    let {message} = error;
     if (message === "Network Error") {
       message = "后端接口连接异常";
-    }
-    else if (message.includes("timeout")) {
+    } else if (message.includes("timeout")) {
       message = "系统接口请求超时";
-    }
-    else if (message.includes("Request failed with status code")) {
+    } else if (message.includes("Request failed with status code")) {
       message = "系统接口" + message.substr(message.length - 3) + "异常";
     }
     Message({
@@ -159,7 +165,7 @@ service.interceptors.response.use( async res => {
 export function getBaseHeader() {
   return {
     'Authorization': "Bearer " + getAccessToken(),
-    'tenant-id': Cookies.get('tenantId'),
+    'tenant-id': getTenantId(),
   }
 }
 

+ 2 - 2
yudao-ui-admin/src/views/bpm/model/index.vue

@@ -429,7 +429,7 @@ export default {
       this.$modal.confirm('是否删除该流程!!').then(function() {
         deleteModel(row.id).then(response => {
           that.getList();
-          that.msgSuccess("删除成功");
+          that.$modal.msgSuccess("删除成功");
         })
       }).catch(() => {});
     },
@@ -439,7 +439,7 @@ export default {
       this.$modal.confirm('是否部署该流程!!').then(function() {
         deployModel(row.id).then(response => {
           that.getList();
-          that.msgSuccess("部署成功");
+          that.$modal.msgSuccess("部署成功");
         })
       }).catch(() => {});
     },

+ 1 - 2
yudao-ui-admin/src/views/bpm/processInstance/create.vue

@@ -55,10 +55,9 @@
 <script>
 import {getProcessDefinitionBpmnXML, getProcessDefinitionList} from "@/api/bpm/definition";
 import {DICT_TYPE, getDictDatas} from "@/utils/dict";
-import {getForm} from "@/api/bpm/form";
 import {decodeFields} from "@/utils/formGenerator";
 import Parser from '@/components/parser/Parser'
-import {createProcessInstance, getMyProcessInstancePage} from "@/api/bpm/processInstance";
+import {createProcessInstance} from "@/api/bpm/processInstance";
 
 // 流程实例的发起
 export default {

+ 1 - 1
yudao-ui-admin/src/views/bpm/processInstance/index.vue

@@ -58,7 +58,7 @@
       </el-table-column>
       <el-table-column label="当前审批任务" align="center" prop="tasks">
         <template slot-scope="scope">
-          <el-button v-for="task in scope.row.tasks" type="text" @click="handleFormDetail(task.id)">
+          <el-button v-for="task in scope.row.tasks" :key="task.id" type="text" @click="handleFormDetail(task.id)">
             <span>{{ task.name }}</span>
           </el-button>
         </template>

+ 1 - 1
yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue

@@ -12,7 +12,7 @@
         </el-table-column>
         <el-table-column label="规则范围" align="center" prop="options" width="440px">
           <template slot-scope="scope">
-            <el-tag size="medium" v-if="scope.row.options" v-for="option in scope.row.options">
+            <el-tag size="medium" v-if="scope.row.options" :key="option" v-for="option in scope.row.options">
               {{ getAssignRuleOptionName(scope.row.type, option) }}
             </el-tag>
           </template>

+ 28 - 27
yudao-ui-admin/src/views/login.vue

@@ -107,9 +107,17 @@
 import {getCodeImg, sendSmsCode, socialAuthRedirect} from "@/api/login";
 import {getTenantIdByName} from "@/api/system/tenant";
 import Cookies from "js-cookie";
-import {decrypt, encrypt} from '@/utils/jsencrypt'
 import {SystemUserSocialTypeEnum} from "@/utils/constants";
 import {getTenantEnable} from "@/utils/ruoyi";
+import {
+  getPassword,
+  getRememberMe, getTenantName,
+  getUsername,
+  removePassword, removeRememberMe, removeTenantName,
+  removeUsername,
+  setPassword, setRememberMe, setTenantId, setTenantName,
+  setUsername
+} from "@/utils/auth";
 
 export default {
   name: "Login",
@@ -161,7 +169,7 @@ export default {
                 const tenantId = res.data;
                 if (tenantId && tenantId >= 0) {
                   // 设置租户
-                  Cookies.set("tenantId", tenantId);
+                  setTenantId(tenantId)
                   callback();
                 } else {
                   callback('租户不存在');
@@ -172,8 +180,6 @@ export default {
           }
         ]
       },
-
-
       loading: false,
       redirect: undefined,
       // 枚举
@@ -213,21 +219,16 @@ export default {
       });
     },
     getCookie() {
-      const username = Cookies.get("username");
-      const password = Cookies.get("password");
-      const rememberMe = Cookies.get('rememberMe')
-      const tenantName = Cookies.get('tenantName');
-      const mobile = Cookies.get('mobile');
-      const mobileCode = Cookies.get('mobileCode');
-      const loginType = Cookies.get('loginType');
+      const username = getUsername();
+      const password = getPassword();
+      const rememberMe = getRememberMe();
+      const tenantName = getTenantName();
       this.loginForm = {
-        username: username === undefined ? this.loginForm.username : username,
-        password: password === undefined ? this.loginForm.password : decrypt(password),
-        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
-        tenantName: tenantName === undefined ? this.loginForm.tenantName : tenantName,
-        mobile: mobile === undefined ? this.loginForm.mobile : mobile,
-        mobileCode: mobileCode === undefined ? this.loginForm.mobileCode : mobileCode,
-        loginType: loginType === undefined ? this.loginForm.loginType : loginType,
+        ...this.loginForm,
+        username: username ? username : this.loginForm.username,
+        password: password ? password : this.loginForm.password,
+        rememberMe: rememberMe ? getRememberMe() : false,
+        tenantName: tenantName ? tenantName : this.loginForm.tenantName,
       };
     },
     handleLogin() {
@@ -236,18 +237,18 @@ export default {
           this.loading = true;
           // 设置 Cookie
           if (this.loginForm.rememberMe) {
-            Cookies.set("username", this.loginForm.username, {expires: 30});
-            Cookies.set("password", encrypt(this.loginForm.password), {expires: 30});
-            Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30});
-            Cookies.set('tenantName', this.loginForm.tenantName, {expires: 30});
+            setUsername(this.loginForm.username)
+            setPassword(this.loginForm.password)
+            setRememberMe(this.loginForm.rememberMe)
+            setTenantName(this.loginForm.tenantName)
           } else {
-            Cookies.remove("username");
-            Cookies.remove("password");
-            Cookies.remove('rememberMe');
-            Cookies.remove('tenantName');
+            removeUsername()
+            removePassword()
+            removeRememberMe()
+            removeTenantName()
           }
           // 发起登陆
-          console.log("发起登录", this.loginForm);
+          // console.log("发起登录", this.loginForm);
           this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
             this.$router.push({path: this.redirect || "/"}).catch(() => {
             });

+ 8 - 8
yudao-ui-admin/src/views/pay/refund/index.vue

@@ -74,7 +74,7 @@
       <!--      <el-table-column label="商户名称" align="center" prop="merchantName" width="120"/>-->
       <!--      <el-table-column label="应用名称" align="center" prop="appName" width="120"/>-->
       <el-table-column label="支付渠道" align="center" width="130">
-        <template v-slot="scope">
+        <template slot-scope="scope">
           <el-popover trigger="hover" placement="top">
             <p>商户名称: {{ scope.row.merchantName }}</p>
             <p>应用名称: {{ scope.row.appName }}</p>
@@ -88,7 +88,7 @@
       <!--      <el-table-column label="交易订单号" align="center" prop="tradeNo" width="140"/>-->
       <!--      <el-table-column label="商户订单编号" align="center" prop="merchantOrderId" width="140"/>-->
       <el-table-column label="商户订单号" align="left" width="230">
-        <template v-slot="scope">
+        <template slot-scope="scope">
           <p class="order-font">
             <el-tag size="mini">退款</el-tag>
             {{ scope.row.merchantRefundNo }}
@@ -100,7 +100,7 @@
         </template>
       </el-table-column>
       <el-table-column label="支付订单号" align="center" prop="merchantRefundNo" width="250">
-        <template v-slot="scope">
+        <template slot-scope="scope">
           <p class="order-font">
             <el-tag size="mini">交易</el-tag>
             {{ scope.row.tradeNo }}
@@ -112,7 +112,7 @@
         </template>
       </el-table-column>
       <el-table-column label="支付金额(元)" align="center" prop="payAmount" width="100">
-        <template v-slot="scope" class="">
+        <template slot-scope="scope" class="">
           ¥{{ parseFloat(scope.row.payAmount / 100).toFixed(2) }}
         </template>
       </el-table-column>
@@ -122,17 +122,17 @@
         </template>
       </el-table-column>
       <el-table-column label="退款类型" align="center" prop="type" width="80">
-        <template v-slot="scope">
+        <template slot-scope="scope">
           <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="scope.row.type" />
         </template>
       </el-table-column>
       <el-table-column label="退款状态" align="center" prop="status">
-        <template v-slot="scope">
+        <template slot-scope="scope">
           <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
       <el-table-column label="回调状态" align="center" prop="notifyStatus">
-        <template v-slot="scope">
+        <template slot-scope="scope">
           <dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="scope.row.notifyStatus" />
         </template>
       </el-table-column>
@@ -183,7 +183,7 @@
           <el-tag class="tag-purple" size="mini">{{ parseFloat(refundDetail.refundAmount / 100).toFixed(2) }}</el-tag>
         </el-descriptions-item>
         <el-descriptions-item label="退款类型">
-          <template v-slot="scope">
+          <template slot-scope="scope">
             <dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="refundDetail.type" />
           </template>
         </el-descriptions-item>

+ 42 - 14
yudao-ui-admin/src/views/socialLogin.vue

@@ -19,7 +19,7 @@
             </el-tab-pane>
           </el-tabs>
           <div>
-            <el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
+            <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
               <!-- 账号密码登录 -->
               <el-form-item prop="username">
                 <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
@@ -65,16 +65,28 @@
 <script>
 import Cookies from "js-cookie";
 import { encrypt, decrypt } from '@/utils/jsencrypt'
+import {
+  getPassword, getRememberMe,
+  getUsername,
+  removePassword,
+  removeUsername,
+  setPassword,
+  setRememberMe,
+  setUsername
+} from "@/utils/auth";
+import {getCodeImg} from "@/api/login";
 
 export default {
   name: "ThirdLogin",
   data() {
     return {
+      codeUrl: "",
+      captchaEnable: true,
       loginForm: {
         loginType: "uname",
         username: "admin",
         password: "admin123",
-        rememberMe: false, // TODO 芋艿:后面看情况,去掉这块
+        rememberMe: false,
       },
       loginRules: {
         username: [
@@ -104,6 +116,7 @@ export default {
     this.getCookie();
     // 重定向地址
     this.redirect = this.$route.query.redirect;
+    this.getCode();
     // 社交登录相关
     this.type = this.$route.query.type;
     this.code = this.$route.query.code;
@@ -119,16 +132,30 @@ export default {
     });
   },
   methods: {
+    getCode() {
+      // 只有开启的状态,才加载验证码。默认开启
+      if (!this.captchaEnable) {
+        return;
+      }
+      // 请求远程,获得验证码
+      getCodeImg().then(res => {
+        res = res.data;
+        this.captchaEnable = res.enable;
+        if (this.captchaEnable) {
+          this.codeUrl = "data:image/gif;base64," + res.img;
+          this.loginForm.uuid = res.uuid;
+        }
+      });
+    },
     getCookie() {
-      const username = Cookies.get("username");
-      const password = Cookies.get("password");
-      const rememberMe = Cookies.get('rememberMe')
-      const loginType = Cookies.get('loginType');
+      const username = getUsername();
+      const password = getPassword();
+      const rememberMe = getRememberMe();
       this.loginForm = {
-        username: username === undefined ? this.loginForm.username : username,
-        password: password === undefined ? this.loginForm.password : decrypt(password),
-        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
-        loginType: loginType === undefined ? this.loginForm.loginType : loginType,
+        username: username ? username : this.loginForm.username,
+        password: password ? password : this.loginForm.password,
+        rememberMe: rememberMe ? getRememberMe() : false,
+        loginType: this.loginForm.loginType,
       };
     },
     handleLogin() {
@@ -136,11 +163,12 @@ export default {
         if (valid) {
           this.loading = true;
           if (this.loginForm.rememberMe) {
-            Cookies.set("username", this.loginForm.username, { expires: 30 });
-            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
+            setUsername(this.loginForm.username)
+            setPassword(this.loginForm.password)
+            setRememberMe(this.loginForm.rememberMe)
           } else {
-            Cookies.remove("username");
-            Cookies.remove("password");
+            removeUsername()
+            removePassword()
           }
           this.$store.dispatch("SocialLogin2", {
             code: this.code,

+ 1 - 1
yudao-ui-admin/src/views/system/oauth2/client/index.vue

@@ -50,7 +50,7 @@
       </el-table-column>
       <el-table-column label="授权类型" align="center" prop="authorizedGrantTypes">
         <template slot-scope="scope">
-          <el-tag :disable-transitions="true" v-for="(authorizedGrantType, index) in scope.row.authorizedGrantTypes" :index="index">
+          <el-tag :disable-transitions="true" :key="index" v-for="(authorizedGrantType, index) in scope.row.authorizedGrantTypes" :index="index">
             {{ authorizedGrantType }}
           </el-tag>
         </template>

+ 1 - 1
yudao-ui-admin/src/views/system/sensitiveWord/index.vue

@@ -54,7 +54,7 @@
       <el-table-column label="描述" align="center" prop="description"/>
       <el-table-column label="标签" align="center" prop="tags">
         <template slot-scope="scope">
-          <el-tag :disable-transitions="true" v-for="(tag, index) in scope.row.tags" :index="index">
+          <el-tag :disable-transitions="true" :key="index" v-for="(tag, index) in scope.row.tags" :index="index">
             {{ tag }}
           </el-tag>
         </template>

+ 1 - 1
yudao-ui-admin/src/views/system/sms/smsTemplate.vue

@@ -147,7 +147,7 @@
         <el-form-item label="手机号" prop="mobile">
           <el-input v-model="sendSmsForm.mobile" placeholder="请输入手机号" />
         </el-form-item>
-        <el-form-item v-for="param in sendSmsForm.params" :label="'参数 {' + param + '}'" :prop="'templateParams.' + param">
+        <el-form-item v-for="param in sendSmsForm.params" :key="param" :label="'参数 {' + param + '}'" :prop="'templateParams.' + param">
           <el-input v-model="sendSmsForm.templateParams[param]" :placeholder="'请输入 ' + param + ' 参数'" />
         </el-form-item>
       </el-form>

+ 2 - 2
yudao-ui-admin/src/views/system/user/index.vue

@@ -111,7 +111,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true"
+              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :clearable="false"
                           placeholder="请选择归属部门" :normalizer="normalizer"/>
             </el-form-item>
           </el-col>
@@ -304,7 +304,7 @@ export default {
         // 设置上传的请求头部
         headers: getBaseHeader(),
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + '/admin-api/' + "/system/user/import"
+        url: process.env.VUE_APP_BASE_API + '/admin-api/system/user/import'
       },
       // 查询参数
       queryParams: {

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff