Browse Source

新增同步结构和数据监听,开发环境默认开启同步更新数据,生产环境默认关闭
更新表全字段初始化数据,避免开启更新数据操作时修改数据不全面的问题

zhontai 2 years ago
parent
commit
2555b1ad6f
26 changed files with 2852 additions and 639 deletions
  1. 3 1
      src/hosts/ZhonTai.Host/Configs/dbconfig.Development.json
  2. 6 2
      src/hosts/ZhonTai.Host/Configs/dbconfig.json
  3. 566 51
      src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json
  4. 20 2
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.json
  5. 20 2
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.tenant.json
  6. 9 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.json
  7. 9 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.tenant.json
  8. 14 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_org.json
  9. 14 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_org.tenant.json
  10. 648 53
      src/hosts/ZhonTai.Host/InitData/Admin/ad_permission.json
  11. 976 350
      src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json
  12. 87 6
      src/hosts/ZhonTai.Host/InitData/Admin/ad_role.json
  13. 87 6
      src/hosts/ZhonTai.Host/InitData/Admin/ad_role.tenant.json
  14. 11 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_tenant.json
  15. 18 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user.json
  16. 18 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user.tenant.json
  17. 9 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_org.json
  18. 6 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_role.json
  19. 12 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.json
  20. 12 1
      src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.tenant.json
  21. 225 23
      src/hosts/ZhonTai.Host/InitData/Admin/ad_view.json
  22. 10 0
      src/platform/ZhonTai.Admin/Core/Configs/DbConfig.cs
  23. 6 4
      src/platform/ZhonTai.Admin/Core/Db/Data/GenerateData.cs
  24. 41 11
      src/platform/ZhonTai.Admin/Core/Db/DbHelper.cs
  25. 15 117
      src/platform/ZhonTai.Admin/Repositories/CustomGenerateData.cs
  26. 10 0
      src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

+ 3 - 1
src/hosts/ZhonTai.Host/Configs/dbconfig.Development.json

@@ -2,5 +2,7 @@
   //监听所有操作
   "monitorCommand": false,
   //监听Curd操作
-  "curd": true
+  "curd": true,
+  //同步更新数据
+  "sysUpdateData": true
 }

+ 6 - 2
src/hosts/ZhonTai.Host/Configs/dbconfig.json

@@ -9,6 +9,10 @@
   "monitorCommand": false,
   //监听Curd操作
   "curd": true,
+  //监听同步结构脚本
+  "syncStructureSql": false,
+  //监听同步数据Curd操作
+  "syncDataCurd": false,
 
   //建库,Sqlite数据库不用配置建库,连接语句自动建库
   "createDb": false,
@@ -28,8 +32,8 @@
   "syncStructure": true,
   //同步数据,只新增数据不修改数据,想要修改数据需开启sysUpdateData
   "syncData": true,
-  //同步更新数据
-  "sysUpdateData": true,
+  //同步更新数据,注意生产环境谨慎开启,确定要修改表数据是最新数据再开启。如不想更新某些表的数据,可以先删除对应表的data.json,再执行数据更新操作
+  "sysUpdateData": false,
   //同步数据地址
   //"SyncDataPath": "InitData/Admin/Vue2",
 

File diff suppressed because it is too large
+ 566 - 51
src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json


+ 20 - 2
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.json

@@ -2,19 +2,37 @@
   {
     "id": 187395320303685,
     "dictionaryTypeId": 187395320434757,
+    "dictionaryType": null,
     "name": "男",
     "code": "male",
     "value": "1",
     "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 0,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 187395320369221,
     "dictionaryTypeId": 187395320434757,
+    "dictionaryType": null,
     "name": "女",
     "code": "female",
     "value": "2",
     "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 0,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 20 - 2
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary.tenant.json

@@ -3,20 +3,38 @@
     "id": 187395320303685,
     "tenantId": 161223412138053,
     "dictionaryTypeId": 187395320434757,
+    "dictionaryType": null,
     "name": "男",
     "code": "male",
     "value": "1",
     "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 0,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 187395320369221,
     "tenantId": 161223412138053,
     "dictionaryTypeId": 187395320434757,
+    "dictionaryType": null,
     "name": "女",
     "code": "female",
     "value": "2",
     "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 0,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 9 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.json

@@ -4,6 +4,14 @@
     "name": "性别",
     "code": "sex",
     "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 0,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 9 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_dictionary_type.tenant.json

@@ -5,6 +5,14 @@
     "name": "性别",
     "code": "sex",
     "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 0,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 14 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_org.json

@@ -1,11 +1,24 @@
 [
   {
     "id": 189097691009093,
+    "parentId": 0,
     "name": "中台",
     "code": "zhontai",
     "value": "",
+    "memberCount": 0,
     "enabled": true,
     "sort": 1,
-    "description": ""
+    "description": "",
+    "staffs": null,
+    "users": null,
+    "roles": null,
+    "childs": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 14 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_org.tenant.json

@@ -2,11 +2,24 @@
   {
     "id": 189097691009093,
     "tenantId": 161223412138053,
+    "parentId": 0,
     "name": "中台",
     "code": "zhontai",
     "value": "",
+    "memberCount": 0,
     "enabled": true,
     "sort": 1,
-    "description": ""
+    "description": "",
+    "staffs": null,
+    "users": null,
+    "roles": null,
+    "childs": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

File diff suppressed because it is too large
+ 648 - 53
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission.json


+ 976 - 350
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json

@@ -1,626 +1,1252 @@
 [
-  {
-    "id": 342275178242117,
-    "permissionId": 161227168641093,
-    "apiId": 161227168186437
-  },
-  {
-    "id": 342275178246213,
-    "permissionId": 161227168641093,
-    "apiId": 188049296683077
-  },
-  {
-    "id": 349750459183174,
-    "permissionId": 161227168641094,
-    "apiId": 161227168186437
-  },
-  {
-    "id": 349750459183175,
-    "permissionId": 161227168641094,
-    "apiId": 161227168186438
-  },
-  {
-    "id": 349750459183176,
-    "permissionId": 161227168641094,
-    "apiId": 188049296683077
-  },
-  {
-    "id": 349750459183173,
-    "permissionId": 161227168641094,
-    "apiId": 336555241422917
-  },
-  {
-    "id": 349750499344454,
-    "permissionId": 161227168645189,
-    "apiId": 161227168182343
-  },
-  {
-    "id": 349750499344455,
-    "permissionId": 161227168645189,
-    "apiId": 161227168186437
-  },
-  {
-    "id": 349750499344456,
-    "permissionId": 161227168645189,
-    "apiId": 161227168190533
-  },
-  {
-    "id": 349750499344457,
-    "permissionId": 161227168645189,
-    "apiId": 188049296683077
-  },
-  {
-    "id": 349750499344453,
-    "permissionId": 161227168645189,
-    "apiId": 336555241422917
-  },
-  {
-    "id": 372387205976133,
-    "permissionId": 161227168645190,
-    "apiId": 271618651926607
-  },
-  {
-    "id": 372387123470405,
-    "permissionId": 161227168649285,
-    "apiId": 336555241427019
-  },
-  {
-    "id": 340637112541253,
-    "permissionId": 161227168653382,
-    "apiId": 336555241422917
-  },
-  {
-    "id": 340637112541254,
-    "permissionId": 161227168653382,
-    "apiId": 336555241422918
-  },
   {
     "id": 171039545122886,
     "permissionId": 161227168657477,
-    "apiId": 161227168174149
+    "permission": null,
+    "apiId": 161227168174149,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171039733657671,
     "permissionId": 161227168657478,
-    "apiId": 161227168170054
+    "permission": null,
+    "apiId": 161227168170054,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171039733657672,
     "permissionId": 161227168657478,
-    "apiId": 161227168178245
-  },
-  {
-    "id": 372387273650245,
-    "permissionId": 161227168661573,
-    "apiId": 271618651926604
-  },
-  {
-    "id": 372387357708357,
-    "permissionId": 161227168665669,
-    "apiId": 336555241422921
+    "permission": null,
+    "apiId": 161227168178245,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171039848452166,
     "permissionId": 161227168669766,
-    "apiId": 161227168116805
+    "permission": null,
+    "apiId": 161227168116805,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171039883370566,
     "permissionId": 161227168673861,
-    "apiId": 161227168120901
+    "permission": null,
+    "apiId": 161227168120901,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171039935344711,
     "permissionId": 161227168673862,
-    "apiId": 161227168079941
+    "permission": null,
+    "apiId": 161227168079941,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171039935344712,
     "permissionId": 161227168673862,
-    "apiId": 161227168120902
-  },
-  {
-    "id": 372400081883205,
-    "permissionId": 161227168677957,
-    "apiId": 271618651914309
-  },
-  {
-    "id": 372400964571205,
-    "permissionId": 161227168677958,
-    "apiId": 372400615755845
+    "permission": null,
+    "apiId": 161227168120902,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040100655174,
     "permissionId": 161227168682053,
-    "apiId": 161227168124998
+    "permission": null,
+    "apiId": 161227168124998,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040178724934,
     "permissionId": 161227168686150,
-    "apiId": 161227168198726
+    "permission": null,
+    "apiId": 161227168198726,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040219164742,
     "permissionId": 161227168690245,
-    "apiId": 161227168202822
+    "permission": null,
+    "apiId": 161227168202822,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040256553031,
     "permissionId": 161227168690246,
-    "apiId": 161227168198725
+    "permission": null,
+    "apiId": 161227168198725,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040256553032,
     "permissionId": 161227168690246,
-    "apiId": 161227168202823
-  },
-  {
-    "id": 372401035112517,
-    "permissionId": 161227168694341,
-    "apiId": 271618651926608
-  },
-  {
-    "id": 372401476096069,
-    "permissionId": 161227168694342,
-    "apiId": 372401403850821
+    "permission": null,
+    "apiId": 161227168202823,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040379768902,
     "permissionId": 161227168698437,
-    "apiId": 161227168206919
+    "permission": null,
+    "apiId": 161227168206919,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171040930574406,
     "permissionId": 161227168702534,
-    "apiId": 161227168141383
+    "permission": null,
+    "apiId": 161227168141383,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171041051480134,
     "permissionId": 161227168706629,
-    "apiId": 161227168153669
-  },
-  {
-    "id": 360709844901957,
-    "permissionId": 161227168706630,
-    "apiId": 161227168153670
-  },
-  {
-    "id": 171041490071623,
-    "permissionId": 161227168710726,
-    "apiId": 161227168145477
-  },
-  {
-    "id": 171041490071624,
-    "permissionId": 161227168710726,
-    "apiId": 161227168157765
+    "permission": null,
+    "apiId": 161227168153669,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171041379016773,
     "permissionId": 161227168714821,
-    "apiId": 161227168145478
+    "permission": null,
+    "apiId": 161227168145478,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171041379016774,
     "permissionId": 161227168714821,
-    "apiId": 161227168157766
-  },
-  {
-    "id": 372387852169285,
-    "permissionId": 161227168718917,
-    "apiId": 187384805367877
-  },
-  {
-    "id": 360709952303173,
-    "permissionId": 161227168727110,
-    "apiId": 161227168165959
-  },
-  {
-    "id": 360709600628805,
-    "permissionId": 161227168731205,
-    "apiId": 161227168165958
+    "permission": null,
+    "apiId": 161227168157766,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360709600628806,
-    "permissionId": 161227168731205,
-    "apiId": 161227168170053
+    "id": 171041490071623,
+    "permissionId": 161227168710726,
+    "permission": null,
+    "apiId": 161227168145477,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 171044112568390,
-    "permissionId": 161227168747589,
-    "apiId": 161227168211013
+    "id": 171041490071624,
+    "permissionId": 161227168710726,
+    "permission": null,
+    "apiId": 161227168157765,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171042505658439,
     "permissionId": 161227168747590,
-    "apiId": 161227168211013
+    "permission": null,
+    "apiId": 161227168211013,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171042505658440,
     "permissionId": 161227168747590,
-    "apiId": 161227168211014
+    "permission": null,
+    "apiId": 161227168211014,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 171044112568390,
+    "permissionId": 161227168747589,
+    "permission": null,
+    "apiId": 161227168211013,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171044276404294,
     "permissionId": 161227168751686,
-    "apiId": 161227168243782
+    "permission": null,
+    "apiId": 161227168243782,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171044306128966,
     "permissionId": 161227168755781,
-    "apiId": 161227168243783
+    "permission": null,
+    "apiId": 161227168243783,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 171044607758405,
+    "permissionId": 161807358345285,
+    "permission": null,
+    "apiId": 170317848645701,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 171044607758406,
+    "permissionId": 161807358345285,
+    "permission": null,
+    "apiId": 170317848662085,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171044724113479,
     "permissionId": 161227168755782,
-    "apiId": 161227168243781
+    "permission": null,
+    "apiId": 161227168243781,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171044724113480,
     "permissionId": 161227168755782,
-    "apiId": 161227168247877
-  },
-  {
-    "id": 372388163334213,
-    "permissionId": 161227168759877,
-    "apiId": 163579785756741
+    "permission": null,
+    "apiId": 161227168247877,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171045341298758,
     "permissionId": 161227168784454,
-    "apiId": 161227168215109
+    "permission": null,
+    "apiId": 161227168215109,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 171045383643206,
     "permissionId": 161227168788550,
-    "apiId": 161227168215110
-  },
-  {
-    "id": 360710797463621,
-    "permissionId": 161227168800838,
-    "apiId": 161227168223302
-  },
-  {
-    "id": 360710817820741,
-    "permissionId": 161227168804933,
-    "apiId": 161227168227397
-  },
-  {
-    "id": 360710880665669,
-    "permissionId": 161227168809029,
-    "apiId": 161227168219205
-  },
-  {
-    "id": 360710880665670,
-    "permissionId": 161227168809029,
-    "apiId": 161227168227398
-  },
-  {
-    "id": 360710901760069,
-    "permissionId": 161227168813125,
-    "apiId": 161227168219206
-  },
-  {
-    "id": 360710901760070,
-    "permissionId": 161227168813125,
-    "apiId": 161227168231493
-  },
-  {
-    "id": 363544618700869,
-    "permissionId": 161227168813126,
-    "apiId": 161227168231494
+    "permission": null,
+    "apiId": 161227168215110,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 185974955921477,
     "permissionId": 161227168821318,
-    "apiId": 161227168215111
+    "permission": null,
+    "apiId": 161227168215111,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 185974955921478,
     "permissionId": 161227168821318,
-    "apiId": 161227168235589
-  },
-  {
-    "id": 360711132024901,
-    "permissionId": 161227168825414,
-    "apiId": 161227168235589
-  },
-  {
-    "id": 360711132024902,
-    "permissionId": 161227168825414,
-    "apiId": 161227168235590
-  },
-  {
-    "id": 363544652439621,
-    "permissionId": 161227168829509,
-    "apiId": 161227168235591
-  },
-  {
-    "id": 360710689267781,
-    "permissionId": 161227168833605,
-    "apiId": 161227168239685
-  },
-  {
-    "id": 363544634417221,
-    "permissionId": 161227168833606,
-    "apiId": 161227168239686
-  },
-  {
-    "id": 171044607758405,
-    "permissionId": 161807358345285,
-    "apiId": 170317848645701
-  },
-  {
-    "id": 171044607758406,
-    "permissionId": 161807358345285,
-    "apiId": 170317848662085
-  },
-  {
-    "id": 187390793699399,
-    "permissionId": 187375358951493,
-    "apiId": 161227168137286
-  },
-  {
-    "id": 187390793703493,
-    "permissionId": 187375358951493,
-    "apiId": 174219034734662
+    "permission": null,
+    "apiId": 161227168235589,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187390759231560,
     "permissionId": 187389970825285,
-    "apiId": 161227168137285
+    "permission": null,
+    "apiId": 161227168137285,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187390759231561,
     "permissionId": 187389970825285,
-    "apiId": 161227168141381
+    "permission": null,
+    "apiId": 161227168141381,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187390759231562,
     "permissionId": 187389970825285,
-    "apiId": 174219034734661
+    "permission": null,
+    "apiId": 174219034734661,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187390759231563,
     "permissionId": 187389970825285,
-    "apiId": 174219034734664
+    "permission": null,
+    "apiId": 174219034734664,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 372389074755654,
-    "permissionId": 187390547820613,
-    "apiId": 271618651922504
+    "id": 187390793699399,
+    "permissionId": 187375358951493,
+    "permission": null,
+    "apiId": 161227168137286,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 372389074755653,
-    "permissionId": 187390547820613,
-    "apiId": 271618651926597
+    "id": 187390793703493,
+    "permissionId": 187375358951493,
+    "permission": null,
+    "apiId": 174219034734662,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187391371079750,
     "permissionId": 187391371018309,
-    "apiId": 184100551516229
+    "permission": null,
+    "apiId": 184100551516229,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187391371079751,
     "permissionId": 187391371018309,
-    "apiId": 184100551532613
+    "permission": null,
+    "apiId": 184100551532613,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187391980814407,
     "permissionId": 187391980761157,
-    "apiId": 161227168137287
+    "permission": null,
+    "apiId": 161227168137287,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 187391980814408,
     "permissionId": 187391980761157,
-    "apiId": 174219034734663
-  },
-  {
-    "id": 360709189963845,
-    "permissionId": 188054258278469,
-    "apiId": 188049296683077
-  },
-  {
-    "id": 360709215817797,
-    "permissionId": 188054341582917,
-    "apiId": 174219034734674
-  },
-  {
-    "id": 360709237321797,
-    "permissionId": 188054416891973,
-    "apiId": 174219034734672
-  },
-  {
-    "id": 360709237325893,
-    "permissionId": 188054416891973,
-    "apiId": 174219034738757
-  },
-  {
-    "id": 372387722547269,
-    "permissionId": 188054509027397,
-    "apiId": 342274923528261
+    "permission": null,
+    "apiId": 174219034734663,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188054656598086,
     "permissionId": 188054656589893,
-    "apiId": 174219034738760
+    "permission": null,
+    "apiId": 174219034738760,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188054719275078,
     "permissionId": 188054719266885,
-    "apiId": 174219034738761
+    "permission": null,
+    "apiId": 174219034738761,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188054776557639,
     "permissionId": 188054776545349,
-    "apiId": 174219034738759
+    "permission": null,
+    "apiId": 174219034738759,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188054776557640,
     "permissionId": 188054776545349,
-    "apiId": 174219034738762
+    "permission": null,
+    "apiId": 174219034738762,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188054835359813,
     "permissionId": 188054834004037,
-    "apiId": 174219034738763
+    "permission": null,
+    "apiId": 174219034738763,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188799732666437,
     "permissionId": 188799732494405,
-    "apiId": 174219034734667
+    "permission": null,
+    "apiId": 174219034734667,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188799795204165,
     "permissionId": 188799795101765,
-    "apiId": 174219034734668
+    "permission": null,
+    "apiId": 174219034734668,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188799878713413,
     "permissionId": 188799878676549,
-    "apiId": 174219034734666
+    "permission": null,
+    "apiId": 174219034734666,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188799878713414,
     "permissionId": 188799878676549,
-    "apiId": 174219034734669
+    "permission": null,
+    "apiId": 174219034734669,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188799949889606,
     "permissionId": 188799949844549,
-    "apiId": 174219034734670
+    "permission": null,
+    "apiId": 174219034734670,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 188799997497414,
     "permissionId": 188799997452357,
-    "apiId": 174219034734671
+    "permission": null,
+    "apiId": 174219034734671,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 189345990312005,
     "permissionId": 189345990168645,
-    "apiId": 174219034738764
+    "permission": null,
+    "apiId": 174219034738764,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 340637112541253,
+    "permissionId": 161227168653382,
+    "permission": null,
+    "apiId": 336555241422917,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 340637112541254,
+    "permissionId": 161227168653382,
+    "permission": null,
+    "apiId": 336555241422918,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 342275178242117,
+    "permissionId": 161227168641093,
+    "permission": null,
+    "apiId": 161227168186437,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 342275178246213,
+    "permissionId": 161227168641093,
+    "permission": null,
+    "apiId": 188049296683077,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750459183173,
+    "permissionId": 161227168641094,
+    "permission": null,
+    "apiId": 336555241422917,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750459183174,
+    "permissionId": 161227168641094,
+    "permission": null,
+    "apiId": 161227168186437,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750459183175,
+    "permissionId": 161227168641094,
+    "permission": null,
+    "apiId": 161227168186438,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750459183176,
+    "permissionId": 161227168641094,
+    "permission": null,
+    "apiId": 188049296683077,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750499344453,
+    "permissionId": 161227168645189,
+    "permission": null,
+    "apiId": 336555241422917,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750499344454,
+    "permissionId": 161227168645189,
+    "permission": null,
+    "apiId": 161227168182343,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750499344455,
+    "permissionId": 161227168645189,
+    "permission": null,
+    "apiId": 161227168186437,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750499344456,
+    "permissionId": 161227168645189,
+    "permission": null,
+    "apiId": 161227168190533,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 349750499344457,
+    "permissionId": 161227168645189,
+    "permission": null,
+    "apiId": 188049296683077,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360708999491653,
+    "permissionId": 349749778899013,
+    "permission": null,
+    "apiId": 349749396619333,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709017350213,
+    "permissionId": 349749511946309,
+    "permission": null,
+    "apiId": 349749396615237,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709080879173,
+    "permissionId": 340890474405957,
+    "permission": null,
+    "apiId": 336555241422919,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709080879174,
+    "permissionId": 340890474405957,
+    "permission": null,
+    "apiId": 0,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709080879175,
+    "permissionId": 340890474405957,
+    "permission": null,
+    "apiId": 188049296683077,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709099552837,
+    "permissionId": 340890633515077,
+    "permission": null,
+    "apiId": 336555241422920,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360709121323077,
     "permissionId": 340645133123653,
-    "apiId": 161227168149574
+    "permission": null,
+    "apiId": 161227168149574,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360709121327173,
     "permissionId": 340645133123653,
-    "apiId": 161227168149575
+    "permission": null,
+    "apiId": 161227168149575,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360709121327174,
     "permissionId": 340645133123653,
-    "apiId": 161227168165957
+    "permission": null,
+    "apiId": 161227168165957,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360709080879174,
-    "permissionId": 340890474405957
+    "id": 360709189963845,
+    "permissionId": 188054258278469,
+    "permission": null,
+    "apiId": 188049296683077,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360709080879175,
-    "permissionId": 340890474405957,
-    "apiId": 188049296683077
+    "id": 360709215817797,
+    "permissionId": 188054341582917,
+    "permission": null,
+    "apiId": 174219034734674,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360709080879173,
-    "permissionId": 340890474405957,
-    "apiId": 336555241422919
+    "id": 360709237321797,
+    "permissionId": 188054416891973,
+    "permission": null,
+    "apiId": 174219034734672,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360709099552837,
-    "permissionId": 340890633515077,
-    "apiId": 336555241422920
+    "id": 360709237325893,
+    "permissionId": 188054416891973,
+    "permission": null,
+    "apiId": 174219034738757,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360710186348613,
-    "permissionId": 343342945812549,
-    "apiId": 336555241422922
+    "id": 360709600628805,
+    "permissionId": 161227168731205,
+    "permission": null,
+    "apiId": 161227168165958,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709600628806,
+    "permissionId": 161227168731205,
+    "permission": null,
+    "apiId": 161227168170053,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709844901957,
+    "permissionId": 161227168706630,
+    "permission": null,
+    "apiId": 161227168153670,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360709952303173,
+    "permissionId": 161227168727110,
+    "permission": null,
+    "apiId": 161227168165959,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360710163017797,
     "permissionId": 343343120306245,
-    "apiId": 336555241427013
+    "permission": null,
+    "apiId": 336555241427013,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360710186348613,
+    "permissionId": 343342945812549,
+    "permission": null,
+    "apiId": 336555241422922,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360710210654277,
+    "permissionId": 343344363630661,
+    "permission": null,
+    "apiId": 336555241427018,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360710378074181,
     "permissionId": 343343209164869,
-    "apiId": 336555241427014
+    "permission": null,
+    "apiId": 336555241427014,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360710409134149,
     "permissionId": 343343735894085,
-    "apiId": 336555241422922
+    "permission": null,
+    "apiId": 336555241422922,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360710409134150,
     "permissionId": 343343735894085,
-    "apiId": 336555241427015
+    "permission": null,
+    "apiId": 336555241427015,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360710512681029,
-    "permissionId": 343343926595653,
-    "apiId": 343342310699077
+    "id": 360710429880389,
+    "permissionId": 343344158351429,
+    "permission": null,
+    "apiId": 336555241427016,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360710497280069,
     "permissionId": 343343989960773,
-    "apiId": 343342310703173
+    "permission": null,
+    "apiId": 343342310703173,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360710512681029,
+    "permissionId": 343343926595653,
+    "permission": null,
+    "apiId": 343342310699077,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 360710534180933,
     "permissionId": 343344066166853,
-    "apiId": 343342310703174
+    "permission": null,
+    "apiId": 343342310703174,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360710429880389,
-    "permissionId": 343344158351429,
-    "apiId": 336555241427016
+    "id": 360710689267781,
+    "permissionId": 161227168833605,
+    "permission": null,
+    "apiId": 161227168239685,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360710210654277,
-    "permissionId": 343344363630661,
-    "apiId": 336555241427018
+    "id": 360710797463621,
+    "permissionId": 161227168800838,
+    "permission": null,
+    "apiId": 161227168223302,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360709017350213,
-    "permissionId": 349749511946309,
-    "apiId": 349749396615237
+    "id": 360710817820741,
+    "permissionId": 161227168804933,
+    "permission": null,
+    "apiId": 161227168227397,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 360708999491653,
-    "permissionId": 349749778899013,
-    "apiId": 349749396619333
+    "id": 360710880665669,
+    "permissionId": 161227168809029,
+    "permission": null,
+    "apiId": 161227168219205,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360710880665670,
+    "permissionId": 161227168809029,
+    "permission": null,
+    "apiId": 161227168227398,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360710901760069,
+    "permissionId": 161227168813125,
+    "permission": null,
+    "apiId": 161227168219206,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360710901760070,
+    "permissionId": 161227168813125,
+    "permission": null,
+    "apiId": 161227168231493,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360711132024901,
+    "permissionId": 161227168825414,
+    "permission": null,
+    "apiId": 161227168235589,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 360711132024902,
+    "permissionId": 161227168825414,
+    "permission": null,
+    "apiId": 161227168235590,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 363544618700869,
+    "permissionId": 161227168813126,
+    "permission": null,
+    "apiId": 161227168231494,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 363544634417221,
+    "permissionId": 161227168833606,
+    "permission": null,
+    "apiId": 161227168239686,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 363544652439621,
+    "permissionId": 161227168829509,
+    "permission": null,
+    "apiId": 161227168235591,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 372004983631941,
     "permissionId": 372004430860357,
-    "apiId": 371292589764677
+    "permission": null,
+    "apiId": 371292589764677,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372387123470405,
+    "permissionId": 161227168649285,
+    "permission": null,
+    "apiId": 336555241427019,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372387205976133,
+    "permissionId": 161227168645190,
+    "permission": null,
+    "apiId": 271618651926607,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372387273650245,
+    "permissionId": 161227168661573,
+    "permission": null,
+    "apiId": 271618651926604,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372387357708357,
+    "permissionId": 161227168665669,
+    "permission": null,
+    "apiId": 336555241422921,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372387722547269,
+    "permissionId": 188054509027397,
+    "permission": null,
+    "apiId": 342274923528261,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372387852169285,
+    "permissionId": 161227168718917,
+    "permission": null,
+    "apiId": 187384805367877,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372388163334213,
+    "permissionId": 161227168759877,
+    "permission": null,
+    "apiId": 163579785756741,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372389074755653,
+    "permissionId": 187390547820613,
+    "permission": null,
+    "apiId": 271618651926597,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372389074755654,
+    "permissionId": 187390547820613,
+    "permission": null,
+    "apiId": 271618651922504,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372393512312901,
+    "permissionId": 372031447494725,
+    "permission": null,
+    "apiId": 372031353708613,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 372398462337093,
     "permissionId": 372004589551685,
-    "apiId": 371678435708997
+    "permission": null,
+    "apiId": 371678435708997,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 372398462349381,
     "permissionId": 372004589551685,
-    "apiId": 371678435725381
+    "permission": null,
+    "apiId": 371678435725381,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
-    "id": 372393512312901,
-    "permissionId": 372031447494725,
-    "apiId": 372031353708613
+    "id": 372400081883205,
+    "permissionId": 161227168677957,
+    "permission": null,
+    "apiId": 271618651914309,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372400964571205,
+    "permissionId": 161227168677958,
+    "permission": null,
+    "apiId": 372400615755845,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372401035112517,
+    "permissionId": 161227168694341,
+    "permission": null,
+    "apiId": 271618651926608,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
+  },
+  {
+    "id": 372401476096069,
+    "permissionId": 161227168694342,
+    "permission": null,
+    "apiId": 372401403850821,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 394676138577989,
     "permissionId": 394672570462277,
-    "apiId": 394672333692997
+    "permission": null,
+    "apiId": 394672333692997,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 394676175425605,
     "permissionId": 394672685342789,
-    "apiId": 394672333688901
+    "permission": null,
+    "apiId": 394672333688901,
+    "api": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   }
 ]

+ 87 - 6
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.json

@@ -2,52 +2,133 @@
   {
     "id": 161223412080709,
     "parentId": 336557474730053,
+    "childs": null,
     "name": "主管理员",
     "code": "main-admin",
     "type": 2,
     "dataScope": 1,
     "description": "",
-    "sort": 1
+    "hidden": false,
+    "sort": 1,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 162605510979653,
     "parentId": 336557578817605,
+    "childs": null,
     "name": "普通员工",
     "code": "emp",
     "type": 2,
     "dataScope": 1,
     "description": "",
-    "sort": 3
+    "hidden": false,
+    "sort": 3,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 336557474730053,
+    "parentId": 0,
+    "childs": null,
     "name": "系统默认",
+    "code": null,
     "type": 1,
     "dataScope": 1,
-    "sort": 1
+    "description": null,
+    "hidden": false,
+    "sort": 1,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 336557508276293,
+    "parentId": 0,
+    "childs": null,
     "name": "职务",
+    "code": null,
     "type": 1,
     "dataScope": 1,
-    "sort": 2
+    "description": null,
+    "hidden": false,
+    "sort": 2,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 336557578817605,
+    "parentId": 0,
+    "childs": null,
     "name": "岗位",
+    "code": null,
     "type": 1,
     "dataScope": 1,
-    "sort": 3
+    "description": null,
+    "hidden": false,
+    "sort": 3,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 340428577087557,
     "parentId": 336557508276293,
+    "childs": null,
     "name": "IT",
     "code": "it",
     "type": 2,
     "dataScope": 1,
     "description": "",
-    "sort": 2
+    "hidden": false,
+    "sort": 2,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 87 - 6
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.tenant.json

@@ -3,57 +3,138 @@
     "id": 161223412080709,
     "tenantId": 161223412138053,
     "parentId": 336557474730053,
+    "childs": null,
     "name": "主管理员",
     "code": "main-admin",
     "type": 2,
     "dataScope": 1,
     "description": "",
-    "sort": 1
+    "hidden": false,
+    "sort": 1,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 162605510979653,
     "tenantId": 161223412138053,
     "parentId": 336557578817605,
+    "childs": null,
     "name": "普通员工",
     "code": "emp",
     "type": 2,
     "dataScope": 1,
     "description": "",
-    "sort": 3
+    "hidden": false,
+    "sort": 3,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 336557474730053,
     "tenantId": 161223412138053,
+    "parentId": 0,
+    "childs": null,
     "name": "系统默认",
+    "code": null,
     "type": 1,
     "dataScope": 1,
-    "sort": 1
+    "description": null,
+    "hidden": false,
+    "sort": 1,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 336557508276293,
     "tenantId": 161223412138053,
+    "parentId": 0,
+    "childs": null,
     "name": "职务",
+    "code": null,
     "type": 1,
     "dataScope": 1,
-    "sort": 2
+    "description": null,
+    "hidden": false,
+    "sort": 2,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 336557578817605,
     "tenantId": 161223412138053,
+    "parentId": 0,
+    "childs": null,
     "name": "岗位",
+    "code": null,
     "type": 1,
     "dataScope": 1,
-    "sort": 3
+    "description": null,
+    "hidden": false,
+    "sort": 3,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   },
   {
     "id": 340428577087557,
     "tenantId": 161223412138053,
     "parentId": 336557508276293,
+    "childs": null,
     "name": "IT",
     "code": "it",
     "type": 2,
     "dataScope": 1,
     "description": "",
-    "sort": 2
+    "hidden": false,
+    "sort": 2,
+    "users": null,
+    "orgs": null,
+    "permissions": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 11 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_tenant.json

@@ -2,11 +2,21 @@
   {
     "id": 161223412138053,
     "userId": 161223411986501,
+    "user": null,
     "orgId": 189097691009093,
+    "org": null,
     "tenantType": 1,
     "dbKey": "masterdb",
+    "dbType": null,
     "connectionString": "",
     "enabled": true,
-    "description": ""
+    "description": "",
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   }
 ]

+ 18 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user.json

@@ -1,14 +1,31 @@
 [
   {
     "id": 161223411986501,
+    "tenant": null,
     "userName": "admin",
     "password": "96E79218965EB72C92A549DD5A330112",
+    "passwordEncryptType": null,
     "name": "管理员",
     "mobile": "13122223333",
     "email": "xiaoxue@zhontai.com",
     "orgId": 189097691009093,
+    "org": null,
+    "managerUserId": null,
+    "managerUser": null,
     "nickName": "小雪转中雪",
+    "avatar": null,
+    "status": null,
     "type": 100,
-    "enabled": true
+    "enabled": true,
+    "roles": null,
+    "orgs": null,
+    "staff": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 18 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user.tenant.json

@@ -2,14 +2,31 @@
   {
     "id": 161223411986501,
     "tenantId": 161223412138053,
+    "tenant": null,
     "userName": "admin",
     "password": "96E79218965EB72C92A549DD5A330112",
+    "passwordEncryptType": null,
     "name": "管理员",
     "mobile": "13122223333",
     "email": "xiaoxue@zhontai.com",
     "orgId": 189097691009093,
+    "org": null,
+    "managerUserId": null,
+    "managerUser": null,
     "nickName": "小雪转中雪",
+    "avatar": null,
+    "status": null,
     "type": 100,
-    "enabled": true
+    "enabled": true,
+    "roles": null,
+    "orgs": null,
+    "staff": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 9 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_org.json

@@ -2,7 +2,15 @@
   {
     "id": 371677390377029,
     "userId": 161223411986501,
+    "user": null,
     "orgId": 189097691009093,
-    "isManager": true
+    "org": null,
+    "isManager": true,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   }
 ]

+ 6 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_role.json

@@ -2,6 +2,11 @@
   {
     "id": 371677390233669,
     "userId": 161223411986501,
-    "roleId": 161223412080709
+    "user": null,
+    "roleId": 161223412080709,
+    "role": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   }
 ]

+ 12 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.json

@@ -1,6 +1,17 @@
 [
   {
     "id": 161223411986501,
-    "sex": 0
+    "position": null,
+    "jobNumber": null,
+    "sex": 0,
+    "entryTime": null,
+    "introduce": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 12 - 1
src/hosts/ZhonTai.Host/InitData/Admin/ad_user_staff.tenant.json

@@ -2,6 +2,17 @@
   {
     "id": 161223411986501,
     "tenantId": 161223412138053,
-    "sex": 0
+    "position": null,
+    "jobNumber": null,
+    "sex": 0,
+    "entryTime": null,
+    "introduce": null,
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:44"
   }
 ]

+ 225 - 23
src/hosts/ZhonTai.Host/InitData/Admin/ad_view.json

@@ -1,7 +1,11 @@
 [
   {
     "id": 161227168313413,
+    "parentId": 0,
+    "name": null,
     "label": "平台管理",
+    "path": null,
+    "description": null,
     "cache": true,
     "sort": 1,
     "enabled": true,
@@ -12,15 +16,26 @@
         "name": "admin/workbench",
         "label": "工作台",
         "path": "admin/workbench/index",
+        "description": null,
         "cache": true,
         "sort": 1,
         "enabled": true,
-        "childs": []
+        "childs": [],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       },
       {
         "id": 161227168432197,
         "parentId": 161227168313413,
+        "name": null,
         "label": "系统管理",
+        "path": null,
+        "description": null,
         "cache": true,
         "sort": 3,
         "enabled": true,
@@ -31,9 +46,18 @@
             "name": "admin/api",
             "label": "接口管理",
             "path": "admin/api/index",
+            "description": null,
             "cache": true,
             "sort": 4,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168444485,
@@ -41,9 +65,18 @@
             "name": "admin/view",
             "label": "视图管理",
             "path": "admin/view/index",
+            "description": null,
             "cache": true,
             "sort": 5,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168448582,
@@ -51,9 +84,18 @@
             "name": "admin/cache",
             "label": "缓存管理",
             "path": "admin/cache/index",
+            "description": null,
             "cache": true,
             "sort": 3,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168456774,
@@ -61,9 +103,18 @@
             "name": "admin/document",
             "label": "文档管理",
             "path": "admin/document/index",
+            "description": null,
             "cache": true,
             "sort": 7,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 187053736300613,
@@ -74,7 +125,15 @@
             "description": "数据字典",
             "cache": true,
             "sort": 1,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 336556164300869,
@@ -85,7 +144,15 @@
             "description": "",
             "cache": true,
             "sort": 2,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 371247502852165,
@@ -93,11 +160,27 @@
             "name": "admin/file",
             "label": "文件管理",
             "path": "admin/file/index",
+            "description": null,
             "cache": true,
             "sort": 6,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           }
-        ]
+        ],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       },
       {
         "id": 161227168436293,
@@ -105,15 +188,25 @@
         "name": "admin/personal",
         "label": "个人中心",
         "path": "admin/personal/index",
+        "description": null,
         "cache": true,
         "sort": 5,
         "enabled": true,
-        "childs": []
+        "childs": [],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       },
       {
         "id": 161227168436294,
         "parentId": 161227168313413,
+        "name": null,
         "label": "权限管理",
+        "path": null,
         "description": "",
         "cache": true,
         "sort": 2,
@@ -128,7 +221,15 @@
             "description": "",
             "cache": true,
             "sort": 1,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168440389,
@@ -139,7 +240,15 @@
             "description": "",
             "cache": true,
             "sort": 2,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168444486,
@@ -147,9 +256,18 @@
             "name": "admin/permission",
             "label": "权限管理",
             "path": "admin/permission/index",
+            "description": null,
             "cache": true,
             "sort": 4,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168448583,
@@ -157,9 +275,18 @@
             "name": "admin/tenant",
             "label": "租户管理",
             "path": "admin/tenant/index",
+            "description": null,
             "cache": true,
             "sort": 5,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 174312361087045,
@@ -170,14 +297,31 @@
             "description": "",
             "cache": true,
             "sort": 3,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           }
-        ]
+        ],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       },
       {
         "id": 161227168452677,
         "parentId": 161227168313413,
+        "name": null,
         "label": "日志管理",
+        "path": null,
         "description": "",
         "cache": true,
         "sort": 4,
@@ -189,9 +333,18 @@
             "name": "admin/oprationLog",
             "label": "操作日志",
             "path": "admin/logs/opration-log",
+            "description": null,
             "cache": true,
             "sort": 2,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           },
           {
             "id": 161227168456773,
@@ -199,18 +352,44 @@
             "name": "admin/loginLog",
             "label": "登录日志",
             "path": "admin/logs/login-log",
+            "description": null,
             "cache": true,
             "sort": 1,
-            "enabled": true
+            "enabled": true,
+            "childs": null,
+            "isDeleted": false,
+            "modifiedUserId": null,
+            "modifiedUserName": null,
+            "modifiedTime": null,
+            "createdUserId": 161223411986501,
+            "createdUserName": "admin",
+            "createdTime": "2023-03-14T11:23:45"
           }
-        ]
+        ],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       }
-    ]
+    ],
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   },
   {
     "id": 361047466754117,
+    "parentId": 0,
     "name": "",
     "label": "布局管理",
+    "path": null,
+    "description": null,
     "cache": true,
     "sort": 2,
     "enabled": true,
@@ -221,10 +400,18 @@
         "name": "link",
         "label": "链接",
         "path": "layout/routerView/link",
+        "description": null,
         "cache": true,
         "sort": 1,
         "enabled": true,
-        "childs": []
+        "childs": [],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       },
       {
         "id": 361047841796165,
@@ -232,11 +419,26 @@
         "name": "iframe",
         "label": "内嵌窗口",
         "path": "layout/routerView/iframes",
+        "description": null,
         "cache": true,
         "sort": 2,
         "enabled": true,
-        "childs": []
+        "childs": [],
+        "isDeleted": false,
+        "modifiedUserId": null,
+        "modifiedUserName": null,
+        "modifiedTime": null,
+        "createdUserId": 161223411986501,
+        "createdUserName": "admin",
+        "createdTime": "2023-03-14T11:23:45"
       }
-    ]
+    ],
+    "isDeleted": false,
+    "modifiedUserId": null,
+    "modifiedUserName": null,
+    "modifiedTime": null,
+    "createdUserId": 161223411986501,
+    "createdUserName": "admin",
+    "createdTime": "2023-03-14T11:23:45"
   }
 ]

+ 10 - 0
src/platform/ZhonTai.Admin/Core/Configs/DbConfig.cs

@@ -43,11 +43,21 @@ public class DbConfig
     /// </summary>
     public bool SyncStructure { get; set; } = false;
 
+    /// <summary>
+    /// 同步结构脚本
+    /// </summary>
+    public bool SyncStructureSql { get; set; } = false;
+
     /// <summary>
     /// 同步数据
     /// </summary>
     public bool SyncData { get; set; } = false;
 
+    /// <summary>
+    /// 同步数据监听Curd操作
+    /// </summary>
+    public bool SyncDataCurd { get; set; } = false;
+
     /// <summary>
     /// 同步更新数据
     /// </summary>

+ 6 - 4
src/platform/ZhonTai.Admin/Core/Db/Data/GenerateData.cs

@@ -12,10 +12,12 @@ public abstract class GenerateData
 {
     protected virtual void SaveDataToJsonFile<T>(object data, bool isTenant = false, string path = "InitData/Admin", PropsContractResolver propsContractResolver = null) where T : class, new()
     {
-        var settings = new JsonSerializerSettings();
-        settings.ContractResolver = propsContractResolver ?? (isTenant ? new CamelCasePropertyNamesContractResolver() : new PropsContractResolver(new List<string> { "TenantId" }));
-        settings.NullValueHandling = NullValueHandling.Ignore;
-        settings.DefaultValueHandling = DefaultValueHandling.Ignore;
+        var settings = new JsonSerializerSettings
+        {
+            ContractResolver = propsContractResolver ?? (isTenant ? new CamelCasePropertyNamesContractResolver() : new PropsContractResolver(new List<string> { "TenantId" }))
+        };
+        //settings.NullValueHandling = NullValueHandling.Ignore;
+        //settings.DefaultValueHandling = DefaultValueHandling.Ignore;
 
         var table = typeof(T).GetCustomAttributes(typeof(TableAttribute), false).FirstOrDefault() as TableAttribute;
         var filePath = Path.Combine(Directory.GetCurrentDirectory(), $"{path}/{table.Name}{(isTenant ? ".tenant" : "")}.json").ToPath();

+ 41 - 11
src/platform/ZhonTai.Admin/Core/Db/DbHelper.cs

@@ -173,7 +173,7 @@ public class DbHelper
             return;
         }
 
-        if (e.AuditValueType == AuditValueType.Insert || e.AuditValueType == AuditValueType.InsertOrUpdate)
+        if (e.AuditValueType is AuditValueType.Insert or AuditValueType.InsertOrUpdate)
         {
             switch (e.Property.Name)
             {
@@ -207,7 +207,8 @@ public class DbHelper
 
             }
         }
-        else if (e.AuditValueType == AuditValueType.Update || e.AuditValueType == AuditValueType.InsertOrUpdate)
+        
+        if (e.AuditValueType is AuditValueType.Update or AuditValueType.InsertOrUpdate)
         {
             switch (e.Property.Name)
             {
@@ -222,6 +223,14 @@ public class DbHelper
         }
     }
 
+    private static void SyncStructureAfter(object? s, SyncStructureAfterEventArgs e)
+    {
+        if (e.Sql.NotNull())
+        {
+            Console.WriteLine(" sync structure sql:\n" + e.Sql);
+        }
+    }
+
     /// <summary>
     /// 同步结构
     /// </summary>
@@ -232,13 +241,10 @@ public class DbHelper
         //Console.WriteLine($"{Environment.NewLine} " + dDL);
 
         //打印结构同步脚本
-        //db.Aop.SyncStructureAfter += (s, e) =>
-        //{
-        //    if (e.Sql.NotNull())
-        //    {
-        //        Console.WriteLine(" sync structure sql:\n" + e.Sql);
-        //    }
-        //};
+        if(dbConfig.SyncStructureSql)
+        {
+            db.Aop.SyncStructureAfter += SyncStructureAfter;
+        }
 
         // 同步结构
         var dbType = dbConfig.Type.ToString();
@@ -253,9 +259,22 @@ public class DbHelper
         var entityTypes = GetEntityTypes(dbConfig.AssemblyNames);
         db.CodeFirst.SyncStructure(entityTypes);
 
+        if (dbConfig.SyncStructureSql)
+        {
+            db.Aop.SyncStructureAfter -= SyncStructureAfter;
+        }
+
         Console.WriteLine($" {(msg.NotNull() ? msg : $"sync {dbType} structure")} succeed");
     }
 
+    private static void SyncDataCurdBefore(object? s, CurdBeforeEventArgs e)
+    {
+        if (e.Sql.NotNull())
+        {
+            Console.WriteLine($"{e.Sql}{Environment.NewLine}");
+        }
+    }
+
     /// <summary>
     /// 同步数据审计方法
     /// </summary>
@@ -284,7 +303,7 @@ public class DbHelper
             return;
         }
 
-        if (e.AuditValueType == AuditValueType.Insert || e.AuditValueType == AuditValueType.InsertOrUpdate)
+        if (e.AuditValueType is AuditValueType.Insert or AuditValueType.InsertOrUpdate)
         {
             switch (e.Property.Name)
             {
@@ -310,7 +329,8 @@ public class DbHelper
                     break;
             }
         }
-        else if (e.AuditValueType == AuditValueType.Update || e.AuditValueType == AuditValueType.InsertOrUpdate)
+
+        if (e.AuditValueType is AuditValueType.Update or AuditValueType.InsertOrUpdate)
         {
             switch (e.Property.Name)
             {
@@ -347,6 +367,11 @@ public class DbHelper
             {
                 db.Aop.AuditValue += SyncDataAuditValue;
 
+                if (dbConfig.SyncDataCurd)
+                {
+                    db.Aop.CurdBefore += SyncDataCurdBefore;
+                }
+
                 Assembly[] assemblies = DependencyContext.Default.RuntimeLibraries
                 .Where(a => dbConfig.AssemblyNames.Contains(a.Name))
                 .Select(o => Assembly.Load(new AssemblyName(o.Name))).ToArray();
@@ -360,6 +385,11 @@ public class DbHelper
                     await syncData.SyncDataAsync(db, dbConfig, appConfig);
                 }
 
+                if (dbConfig.SyncDataCurd)
+                {
+                    db.Aop.CurdBefore -= SyncDataCurdBefore;
+                }
+
                 db.Aop.AuditValue -= SyncDataAuditValue;
             }
 

+ 15 - 117
src/platform/ZhonTai.Admin/Repositories/CustomGenerateData.cs

@@ -26,45 +26,21 @@ namespace ZhonTai.Admin.Repositories;
 
 public class CustomGenerateData : GenerateData, IGenerateData
 {
-    public virtual Task GenerateDataAsync(IFreeSql db, AppConfig appConfig)
+    public virtual async Task GenerateDataAsync(IFreeSql db, AppConfig appConfig)
     {
         #region 读取数据
 
         //admin
         #region 数据字典
 
-        var dictionaryTypes = db.Queryable<DictionaryTypeEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var dictionaryTypes = await db.Queryable<DictionaryTypeEntity>().ToListAsync();
 
-        var dictionaries = db.Queryable<DictionaryEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var dictionaries = await db.Queryable<DictionaryEntity>().ToListAsync();
         #endregion
 
         #region 接口
 
-        var apis = db.Queryable<ApiEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var apis = await db.Queryable<ApiEntity>().ToListAsync();
         var apiTree = apis.Clone().ToTree((r, c) =>
         {
             return c.ParentId == 0;
@@ -83,15 +59,7 @@ public class CustomGenerateData : GenerateData, IGenerateData
 
         #region 视图
 
-        var views = db.Queryable<ViewEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var views = await db.Queryable<ViewEntity>().ToListAsync();
         var viewTree = views.Clone().ToTree((r, c) =>
         {
             return c.ParentId == 0;
@@ -137,43 +105,19 @@ public class CustomGenerateData : GenerateData, IGenerateData
 
         #region 用户
 
-        var users = db.Queryable<UserEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var users = await db.Queryable<UserEntity>().ToListAsync();
 
         #endregion
 
         #region 员工
 
-        var staffs = db.Queryable<UserStaffEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var staffs = await db.Queryable<UserStaffEntity>().ToListAsync();
 
         #endregion
 
         #region 部门
 
-        var orgs = db.Queryable<OrgEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var orgs = await db.Queryable<OrgEntity>().ToListAsync();
         var orgTree = orgs.Clone().ToTree((r, c) =>
         {
             return c.ParentId == 0;
@@ -192,87 +136,43 @@ public class CustomGenerateData : GenerateData, IGenerateData
 
         #region 角色
 
-        var roles = db.Queryable<RoleEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var roles = await db.Queryable<RoleEntity>().ToListAsync();
 
         #endregion
 
         #region 用户角色
 
-        var userRoles = db.Queryable<UserRoleEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName
-        });
+        var userRoles = await db.Queryable<UserRoleEntity>().ToListAsync();
 
         #endregion
 
         #region 用户部门
 
-        var userOrgs = db.Queryable<UserOrgEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var userOrgs = await db.Queryable<UserOrgEntity>().ToListAsync();
 
         #endregion
 
         #region 角色权限
 
-        var rolePermissions = db.Queryable<RolePermissionEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName
-        });
+        var rolePermissions = await db.Queryable<RolePermissionEntity>().ToListAsync();
 
         #endregion
 
         #region 租户
 
-        var tenants = db.Queryable<TenantEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName,
-            a.ModifiedTime,
-            a.ModifiedUserId,
-            a.ModifiedUserName
-        });
+        var tenants = await db.Queryable<TenantEntity>().ToListAsync();
 
         #endregion
 
         #region 租户权限
 
-        var tenantPermissions = db.Queryable<TenantPermissionEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName
-        });
+        var tenantPermissions = await db.Queryable<TenantPermissionEntity>().ToListAsync();
 
         #endregion
 
         #region 权限接口
 
-        var permissionApis = db.Queryable<PermissionApiEntity>().ToListIgnore(a => new
-        {
-            a.CreatedTime,
-            a.CreatedUserId,
-            a.CreatedUserName
-        });
+        var permissionApis = await db.Queryable<PermissionApiEntity>().ToListAsync();
 
         #endregion
 
@@ -321,7 +221,5 @@ public class CustomGenerateData : GenerateData, IGenerateData
         SaveDataToJsonFile<TenantEntity>(tenants);
         SaveDataToJsonFile<TenantPermissionEntity>(tenantPermissions, propsContractResolver: new PropsContractResolver());
         #endregion
-
-        return Task.CompletedTask;
     }
 }

+ 10 - 0
src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

@@ -606,11 +606,21 @@
             同步结构
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Core.Configs.DbConfig.SyncStructureSql">
+            <summary>
+            同步结构脚本
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Core.Configs.DbConfig.SyncData">
             <summary>
             同步数据
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Core.Configs.DbConfig.SyncDataCurd">
+            <summary>
+            同步数据监听Curd操作
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Core.Configs.DbConfig.SysUpdateData">
             <summary>
             同步更新数据

Some files were not shown because too many files changed in this diff