Browse Source

更新权限初始化数据
新增用户基本信息查询dto

zhontai 2 năm trước cách đây
mục cha
commit
f6c049654c

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

@@ -283,205 +283,6 @@
               }
             ]
           },
-          {
-            "id": 161227168669765,
-            "parentId": 161227168636997,
-            "label": "接口管理",
-            "type": 2,
-            "viewId": 161227168440390,
-            "name": "admin/api",
-            "path": "/platform/auth/api",
-            "icon": "ele-Operation",
-            "opened": true,
-            "isKeepAlive": true,
-            "sort": 5,
-            "description": "",
-            "enabled": true,
-            "childs": [
-              {
-                "id": 161227168669766,
-                "parentId": 161227168669765,
-                "label": "查询",
-                "code": "api:admin:api:getlist",
-                "type": 3,
-                "path": "",
-                "icon": "",
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 1,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168673861,
-                "parentId": 161227168669765,
-                "label": "新增",
-                "code": "api:admin:api:add",
-                "type": 3,
-                "path": " ",
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 2,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168673862,
-                "parentId": 161227168669765,
-                "label": "修改",
-                "code": "api:admin:api:update",
-                "type": 3,
-                "path": " ",
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 3,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168677957,
-                "parentId": 161227168669765,
-                "label": "删除",
-                "code": "api:admin:api:softdelete",
-                "type": 3,
-                "path": " ",
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 4,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168677958,
-                "parentId": 161227168669765,
-                "label": "批量删除",
-                "code": "api:admin:api:batchsoftdelete",
-                "type": 3,
-                "path": "",
-                "icon": "",
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 5,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168682053,
-                "parentId": 161227168669765,
-                "label": "同步",
-                "code": "api:admin:api:sync",
-                "type": 3,
-                "path": "",
-                "icon": "",
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 6,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              }
-            ]
-          },
-          {
-            "id": 161227168686149,
-            "parentId": 161227168636997,
-            "label": "视图管理",
-            "type": 2,
-            "viewId": 161227168444485,
-            "name": "admin/view",
-            "path": "/platform/auth/view",
-            "icon": "ele-Menu",
-            "opened": true,
-            "isKeepAlive": true,
-            "sort": 6,
-            "description": "",
-            "enabled": true,
-            "childs": [
-              {
-                "id": 161227168686150,
-                "parentId": 161227168686149,
-                "label": "查询",
-                "code": "api:admin:view:getlist",
-                "type": 3,
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 1,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168690245,
-                "parentId": 161227168686149,
-                "label": "新增",
-                "code": "api:admin:view:add",
-                "type": 3,
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 2,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168690246,
-                "parentId": 161227168686149,
-                "label": "修改",
-                "code": "api:admin:view:update",
-                "type": 3,
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 3,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168694341,
-                "parentId": 161227168686149,
-                "label": "删除",
-                "code": "api:admin:view:softdelete",
-                "type": 3,
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 4,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168694342,
-                "parentId": 161227168686149,
-                "label": "批量删除",
-                "code": "api:admin:view:batchsoftdelete",
-                "type": 3,
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 5,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              },
-              {
-                "id": 161227168698437,
-                "parentId": 161227168686149,
-                "label": "同步",
-                "code": "api:admin:view:sync",
-                "type": 3,
-                "opened": true,
-                "isKeepAlive": true,
-                "sort": 6,
-                "description": "",
-                "enabled": true,
-                "childs": []
-              }
-            ]
-          },
           {
             "id": 161227168702533,
             "parentId": 161227168636997,
@@ -627,10 +428,10 @@
             "viewId": 161227168448583,
             "name": "admin/tenant",
             "path": "/platform/auth/tenant",
-            "icon": "fa fa-user-o",
+            "icon": "fa fa-user-circle",
             "opened": true,
             "isKeepAlive": true,
-            "sort": 7,
+            "sort": 5,
             "description": "",
             "enabled": true,
             "childs": [
@@ -735,7 +536,7 @@
             "viewId": 174312361087045,
             "name": "admin/org",
             "path": "/platform/auth/org",
-            "icon": "ele-HomeFilled",
+            "icon": "fa fa-sitemap",
             "opened": true,
             "isKeepAlive": true,
             "sort": 3,
@@ -812,6 +613,205 @@
         "description": "",
         "enabled": true,
         "childs": [
+          {
+            "id": 161227168669765,
+            "parentId": 161227168763974,
+            "label": "接口管理",
+            "type": 2,
+            "viewId": 161227168440390,
+            "name": "admin/api",
+            "path": "/platform/system/api",
+            "icon": "ele-Operation",
+            "opened": true,
+            "isKeepAlive": true,
+            "sort": 4,
+            "description": "",
+            "enabled": true,
+            "childs": [
+              {
+                "id": 161227168669766,
+                "parentId": 161227168669765,
+                "label": "查询",
+                "code": "api:admin:api:getlist",
+                "type": 3,
+                "path": "",
+                "icon": "",
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 1,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168673861,
+                "parentId": 161227168669765,
+                "label": "新增",
+                "code": "api:admin:api:add",
+                "type": 3,
+                "path": " ",
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 2,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168673862,
+                "parentId": 161227168669765,
+                "label": "修改",
+                "code": "api:admin:api:update",
+                "type": 3,
+                "path": " ",
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 3,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168677957,
+                "parentId": 161227168669765,
+                "label": "删除",
+                "code": "api:admin:api:softdelete",
+                "type": 3,
+                "path": " ",
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 4,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168677958,
+                "parentId": 161227168669765,
+                "label": "批量删除",
+                "code": "api:admin:api:batchsoftdelete",
+                "type": 3,
+                "path": "",
+                "icon": "",
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 5,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168682053,
+                "parentId": 161227168669765,
+                "label": "同步",
+                "code": "api:admin:api:sync",
+                "type": 3,
+                "path": "",
+                "icon": "",
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 6,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              }
+            ]
+          },
+          {
+            "id": 161227168686149,
+            "parentId": 161227168763974,
+            "label": "视图管理",
+            "type": 2,
+            "viewId": 161227168444485,
+            "name": "admin/view",
+            "path": "/platform/system/view",
+            "icon": "ele-Menu",
+            "opened": true,
+            "isKeepAlive": true,
+            "sort": 5,
+            "description": "",
+            "enabled": true,
+            "childs": [
+              {
+                "id": 161227168686150,
+                "parentId": 161227168686149,
+                "label": "查询",
+                "code": "api:admin:view:getlist",
+                "type": 3,
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 1,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168690245,
+                "parentId": 161227168686149,
+                "label": "新增",
+                "code": "api:admin:view:add",
+                "type": 3,
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 2,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168690246,
+                "parentId": 161227168686149,
+                "label": "修改",
+                "code": "api:admin:view:update",
+                "type": 3,
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 3,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168694341,
+                "parentId": 161227168686149,
+                "label": "删除",
+                "code": "api:admin:view:softdelete",
+                "type": 3,
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 4,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168694342,
+                "parentId": 161227168686149,
+                "label": "批量删除",
+                "code": "api:admin:view:batchsoftdelete",
+                "type": 3,
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 5,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              },
+              {
+                "id": 161227168698437,
+                "parentId": 161227168686149,
+                "label": "同步",
+                "code": "api:admin:view:sync",
+                "type": 3,
+                "opened": true,
+                "isKeepAlive": true,
+                "sort": 6,
+                "description": "",
+                "enabled": true,
+                "childs": []
+              }
+            ]
+          },
           {
             "id": 161227168743493,
             "parentId": 161227168763974,
@@ -819,7 +819,7 @@
             "type": 2,
             "viewId": 161227168448582,
             "name": "admin/cache",
-            "path": "/platform/auth/cache",
+            "path": "/platform/system/cache",
             "icon": "ele-Brush",
             "opened": true,
             "isKeepAlive": true,
@@ -867,7 +867,7 @@
             "opened": true,
             "external": true,
             "isKeepAlive": true,
-            "sort": 4,
+            "sort": 6,
             "description": "",
             "enabled": true,
             "childs": [
@@ -1088,7 +1088,7 @@
           {
             "id": 342340463398981,
             "parentId": 161227168763974,
-            "label": "任务管理",
+            "label": "任务调度",
             "type": 2,
             "viewId": 336556164300869,
             "name": "admin/task",
@@ -1351,7 +1351,7 @@
     "viewId": 161227168436293,
     "name": "personal",
     "path": "/personal",
-    "icon": "fa fa-user-circle",
+    "icon": "iconfont icon-gerenzhongxin",
     "opened": true,
     "isKeepAlive": true,
     "sort": 3,

+ 29 - 0
src/platform/ZhonTai.Admin/Services/User/Dto/UserGetBasicOutput.cs

@@ -0,0 +1,29 @@
+namespace ZhonTai.Admin.Services.User.Dto;
+
+public class UserGetBasicOutput
+{
+    /// <summary>
+    /// 头像
+    /// </summary>
+    public string Avatar { get; set; }
+
+    /// <summary>
+    /// 姓名
+    /// </summary>
+    public string Name { get; set; }
+
+    /// <summary>
+    /// 昵称
+    /// </summary>
+    public string NickName { get; set; }
+
+    /// <summary>
+    /// 手机号
+    /// </summary>
+    public string Mobile { get; set; }
+
+    /// <summary>
+    /// 邮箱
+    /// </summary>
+    public string Email { get; set; }
+}

+ 0 - 5
src/platform/ZhonTai.Admin/Services/User/Dto/UserUpdateBasicInput.cs

@@ -23,9 +23,4 @@ public class UserUpdateBasicInput : Entity
     /// 昵称
     /// </summary>
     public string NickName { get; set; }
-
-    /// <summary>
-    /// 个人简介
-    /// </summary>
-    public string Introduce { get; set; }
 }

+ 1 - 1
src/platform/ZhonTai.Admin/Services/User/IUserService.cs

@@ -44,7 +44,7 @@ public interface IUserService
 
     Task UpdateBasicAsync(UserUpdateBasicInput input);
 
-    Task<UserUpdateBasicInput> GetBasicAsync();
+    Task<UserGetBasicOutput> GetBasicAsync();
 
     Task<IList<UserPermissionsOutput>> GetPermissionsAsync();
 

+ 2 - 2
src/platform/ZhonTai.Admin/Services/User/UserService.cs

@@ -241,14 +241,14 @@ public class UserService : BaseService, IUserService, IDynamicApi
     /// </summary>
     /// <returns></returns>
     [Login]
-    public async Task<UserUpdateBasicInput> GetBasicAsync()
+    public async Task<UserGetBasicOutput> GetBasicAsync()
     {
         if (!(User?.Id > 0))
         {
             throw ResultOutput.Exception("未登录!");
         }
 
-        var data = await _userRepository.GetAsync<UserUpdateBasicInput>(User.Id);
+        var data = await _userRepository.GetAsync<UserGetBasicOutput>(User.Id);
         return data;
     }
 

+ 25 - 5
src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

@@ -5879,6 +5879,31 @@
             员工
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Services.User.Dto.UserGetBasicOutput.Avatar">
+            <summary>
+            头像
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.User.Dto.UserGetBasicOutput.Name">
+            <summary>
+            姓名
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.User.Dto.UserGetBasicOutput.NickName">
+            <summary>
+            昵称
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.User.Dto.UserGetBasicOutput.Mobile">
+            <summary>
+            手机号
+            </summary>
+        </member>
+        <member name="P:ZhonTai.Admin.Services.User.Dto.UserGetBasicOutput.Email">
+            <summary>
+            邮箱
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Services.User.Dto.UserGetOutput.Roles">
             <summary>
             角色列表
@@ -6039,11 +6064,6 @@
             昵称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.User.Dto.UserUpdateBasicInput.Introduce">
-            <summary>
-            个人简介
-            </summary>
-        </member>
         <member name="T:ZhonTai.Admin.Services.User.Dto.UserUpdateInput">
             <summary>
             修改