1
0
Pārlūkot izejas kodu

优化初始化数据

zhontai 2 gadi atpakaļ
vecāks
revīzija
b53d77e2c8

+ 16 - 13
src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json

@@ -1182,7 +1182,6 @@
     "label": "员工管理",
     "path": "staff",
     "description": "",
-    "enabled": true,
     "childs": [
       {
         "id": 174219034734666,
@@ -1191,7 +1190,6 @@
         "path": "/api/admin/staff/get",
         "httpMethods": "get",
         "description": "",
-        "enabled": true,
         "childs": []
       },
       {
@@ -1201,7 +1199,6 @@
         "path": "/api/admin/staff/get-page",
         "httpMethods": "post",
         "description": "",
-        "enabled": true,
         "childs": []
       },
       {
@@ -1211,7 +1208,6 @@
         "path": "/api/admin/staff/add",
         "httpMethods": "post",
         "description": "",
-        "enabled": true,
         "childs": []
       },
       {
@@ -1221,7 +1217,6 @@
         "path": "/api/admin/staff/update",
         "httpMethods": "put",
         "description": "",
-        "enabled": true,
         "childs": []
       },
       {
@@ -1231,7 +1226,6 @@
         "path": "/api/admin/staff/soft-delete",
         "httpMethods": "delete",
         "description": "",
-        "enabled": true,
         "childs": []
       },
       {
@@ -1241,14 +1235,13 @@
         "path": "/api/admin/staff/batch-soft-delete",
         "httpMethods": "put",
         "description": "",
-        "enabled": true,
         "childs": []
       }
     ]
   },
   {
     "id": 174219034718277,
-    "label": "组织架构",
+    "label": "部门服务",
     "path": "org",
     "description": "",
     "enabled": true,
@@ -1256,7 +1249,7 @@
       {
         "id": 174219034734672,
         "parentId": 174219034718277,
-        "label": "查询组织架构",
+        "label": "查询部门",
         "path": "/api/admin/org/get",
         "httpMethods": "get",
         "description": "",
@@ -1266,7 +1259,7 @@
       {
         "id": 174219034734674,
         "parentId": 174219034718277,
-        "label": "新增组织架构",
+        "label": "新增",
         "path": "/api/admin/org/add",
         "httpMethods": "post",
         "description": "",
@@ -1276,7 +1269,7 @@
       {
         "id": 174219034738757,
         "parentId": 174219034718277,
-        "label": "修改组织架构",
+        "label": "修改",
         "path": "/api/admin/org/update",
         "httpMethods": "put",
         "description": "",
@@ -1286,7 +1279,7 @@
       {
         "id": 174219034738758,
         "parentId": 174219034718277,
-        "label": "删除组织架构",
+        "label": "批量删除",
         "path": "/api/admin/org/soft-delete",
         "httpMethods": "delete",
         "description": "",
@@ -1296,12 +1289,22 @@
       {
         "id": 188049296683077,
         "parentId": 174219034718277,
-        "label": "查询组织架构列表",
+        "label": "查询列表",
         "path": "/api/admin/org/get-list",
         "httpMethods": "get",
         "description": "",
         "enabled": true,
         "childs": []
+      },
+      {
+        "id": 342274923528261,
+        "parentId": 174219034718277,
+        "label": "彻底删除",
+        "path": "/api/admin/org/delete",
+        "httpMethods": "delete",
+        "description": "",
+        "enabled": true,
+        "childs": []
       }
     ]
   },

+ 5 - 5
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission.json

@@ -169,7 +169,7 @@
                 "id": 161227168645190,
                 "parentId": 161227168636998,
                 "label": "删除",
-                "code": "api:admin:user:softdelete",
+                "code": "api:admin:user:delete",
                 "type": 3,
                 "path": "",
                 "enabled": true,
@@ -183,7 +183,7 @@
                 "id": 161227168649285,
                 "parentId": 161227168636998,
                 "label": "批量删除",
-                "code": "api:admin:user:batchsoftdelete",
+                "code": "api:admin:user:batchdelete",
                 "type": 3,
                 "path": "",
                 "icon": "",
@@ -254,7 +254,7 @@
                 "id": 161227168661573,
                 "parentId": 161227168653381,
                 "label": "删除",
-                "code": "api:admin:role:softdelete",
+                "code": "api:admin:role:delete",
                 "type": 3,
                 "path": " ",
                 "enabled": true,
@@ -268,7 +268,7 @@
                 "id": 161227168665669,
                 "parentId": 161227168653381,
                 "label": "批量删除",
-                "code": "api:admin:role:batchsoftdelete",
+                "code": "api:admin:role:batchdelete",
                 "type": 3,
                 "path": " ",
                 "icon": "",
@@ -282,7 +282,7 @@
               {
                 "id": 340645133123653,
                 "parentId": 161227168653381,
-                "label": "设置权限",
+                "label": "设置菜单权限",
                 "code": "api:admin:permission:assign",
                 "type": 3,
                 "enabled": true,

+ 48 - 18
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json

@@ -20,47 +20,67 @@
     "apiId": 161227168194629
   },
   {
-    "id": 171055081529413,
+    "id": 342275178242117,
     "permissionId": 161227168641093,
     "apiId": 161227168186437
   },
   {
-    "id": 189095579377733,
+    "id": 342275178246213,
+    "permissionId": 161227168641093,
+    "apiId": 188049296683077
+  },
+  {
+    "id": 342275308441670,
     "permissionId": 161227168641094,
     "apiId": 161227168186438
   },
   {
-    "id": 189095579377734,
+    "id": 342275308441671,
     "permissionId": 161227168641094,
-    "apiId": 189095453691973
+    "apiId": 188049296683077
   },
   {
-    "id": 171036587671621,
+    "id": 342275308441669,
+    "permissionId": 161227168641094,
+    "apiId": 336555241422917
+  },
+  {
+    "id": 342275386585158,
     "permissionId": 161227168645189,
     "apiId": 161227168182343
   },
   {
-    "id": 171036587671622,
+    "id": 342275386585159,
     "permissionId": 161227168645189,
     "apiId": 161227168190533
   },
   {
-    "id": 340873399033925,
+    "id": 342275386585160,
+    "permissionId": 161227168645189,
+    "apiId": 188049296683077
+  },
+  {
+    "id": 342275386585157,
+    "permissionId": 161227168645189,
+    "apiId": 336555241422917
+  },
+  {
+    "id": 342282197545029,
     "permissionId": 161227168645190,
     "apiId": 161227168190534
   },
   {
-    "id": 340873399050309,
+    "id": 342282197545030,
     "permissionId": 161227168645190,
     "apiId": 271618651926607
   },
   {
-    "id": 340873433083973,
+    "id": 342282494840901,
     "permissionId": 161227168649285,
     "apiId": 161227168190535
   },
   {
-    "id": 340873433083974,
+    "id": 342282494840902,
     "permissionId": 161227168649285,
     "apiId": 336555241427019
   },
@@ -90,22 +110,22 @@
     "apiId": 161227168178245
   },
   {
-    "id": 340807468544069,
+    "id": 342280979902533,
     "permissionId": 161227168661573,
     "apiId": 161227168178246
   },
   {
-    "id": 340807468556357,
+    "id": 342280979902534,
     "permissionId": 161227168661573,
     "apiId": 271618651926604
   },
   {
-    "id": 340807522390085,
+    "id": 342281320968261,
     "permissionId": 161227168665669,
     "apiId": 161227168182341
   },
   {
-    "id": 340807522390086,
+    "id": 342281320968262,
     "permissionId": 161227168665669,
     "apiId": 336555241422921
   },
@@ -560,22 +580,32 @@
     "apiId": 174219034738764
   },
   {
-    "id": 340645681578053,
+    "id": 342277088911429,
     "permissionId": 340645133123653,
     "apiId": 161227168149574
   },
   {
-    "id": 340645681578054,
+    "id": 342277088911430,
     "permissionId": 340645133123653,
     "apiId": 161227168149575
   },
   {
-    "id": 340645681578055,
+    "id": 342277088911431,
     "permissionId": 340645133123653,
     "apiId": 161227168165957
   },
   {
-    "id": 340890474479685,
+    "id": 342277691510854,
+    "permissionId": 340890474405957,
+    "apiId": 174219034734667
+  },
+  {
+    "id": 342277691510855,
+    "permissionId": 340890474405957,
+    "apiId": 188049296683077
+  },
+  {
+    "id": 342277691510853,
     "permissionId": 340890474405957,
     "apiId": 336555241422919
   },

+ 20 - 17
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.json

@@ -1,9 +1,4 @@
 [
-  {
-    "id": 336557474730053,
-    "name": "系统默认",
-    "sort": 1
-  },
   {
     "id": 161223412080709,
     "parentId": 336557474730053,
@@ -13,28 +8,36 @@
     "description": ""
   },
   {
-    "id": 336557508276293,
-    "name": "职务",
-    "sort": 2
+    "id": 162605510979653,
+    "parentId": 336557578817605,
+    "name": "普通员工",
+    "code": "emp",
+    "dataScope": 1,
+    "description": ""
   },
   {
-    "id": 340428577087557,
-    "parentId": 336557508276293,
-    "name": "IT",
-    "code": "it",
+    "id": 336557474730053,
+    "name": "系统默认",
     "dataScope": 1,
-    "description": ""
+    "sort": 1
+  },
+  {
+    "id": 336557508276293,
+    "name": "职务",
+    "dataScope": 1,
+    "sort": 2
   },
   {
     "id": 336557578817605,
     "name": "岗位",
+    "dataScope": 1,
     "sort": 3
   },
   {
-    "id": 162605510979653,
-    "parentId": 336557578817605,
-    "name": "普通员工",
-    "code": "emp",
+    "id": 340428577087557,
+    "parentId": 336557508276293,
+    "name": "IT",
+    "code": "it",
     "dataScope": 1,
     "description": ""
   }

+ 21 - 18
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.tenant.json

@@ -1,10 +1,4 @@
 [
-  {
-    "id": 336557474730053,
-    "tenantId": 161223412138053,
-    "name": "系统默认",
-    "sort": 1
-  },
   {
     "id": 161223412080709,
     "tenantId": 161223412138053,
@@ -15,32 +9,41 @@
     "description": ""
   },
   {
-    "id": 336557508276293,
+    "id": 162605510979653,
     "tenantId": 161223412138053,
-    "name": "职务",
-    "sort": 2
+    "parentId": 336557578817605,
+    "name": "普通员工",
+    "code": "emp",
+    "dataScope": 1,
+    "description": ""
   },
   {
-    "id": 340428577087557,
+    "id": 336557474730053,
     "tenantId": 161223412138053,
-    "parentId": 336557508276293,
-    "name": "IT",
-    "code": "it",
+    "name": "系统默认",
     "dataScope": 1,
-    "description": ""
+    "sort": 1
+  },
+  {
+    "id": 336557508276293,
+    "tenantId": 161223412138053,
+    "name": "职务",
+    "dataScope": 1,
+    "sort": 2
   },
   {
     "id": 336557578817605,
     "tenantId": 161223412138053,
     "name": "岗位",
+    "dataScope": 1,
     "sort": 3
   },
   {
-    "id": 162605510979653,
+    "id": 340428577087557,
     "tenantId": 161223412138053,
-    "parentId": 336557578817605,
-    "name": "普通员工",
-    "code": "emp",
+    "parentId": 336557508276293,
+    "name": "IT",
+    "code": "it",
     "dataScope": 1,
     "description": ""
   }

+ 0 - 1
src/platform/ZhonTai.Admin/Core/Db/DBServiceCollectionExtensions.cs

@@ -14,7 +14,6 @@ using System.Collections.Concurrent;
 using System.Reflection;
 using ZhonTai.Admin.Domain.User;
 using ZhonTai.Admin.Domain.Role;
-using System.Diagnostics;
 
 namespace ZhonTai.Admin.Core.Db;
 

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

@@ -2694,6 +2694,16 @@
             用户
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Domain.User.UserEntity.OwnerId">
+            <summary>
+            拥有者Id
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Domain.User.UserEntity.CreatedOrgId">
+            <summary>
+            创建者部门Id
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Domain.User.UserEntity.TenantId">
             <summary>
             租户Id