Procházet zdrojové kódy

新增 租户授权部门OrgId字段,租户表删除Name、Code、RealName、Phone、Email字段,更新结构时已存在的数据不会删除,如不需要可手动删除
新增 租户新增和修改时新增企业账号、手机号、邮箱判断
修复 租户初始化用户密码没有支持PasswordHasher的问题
修复 租户彻底删除没有删除部门表数据的问题
优化 用户服务新增和修改用户、会员接口数据校验
优化 租户服务查询和查询分页接口查询部门和用户表数据
更新初始化数据
更新freesql

zhontai před 2 roky
rodič
revize
7bea068f2b

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

@@ -34,7 +34,7 @@
   //"SyncDataPath": "InitData/Admin/Vue2",
 
   //项目初始化不开启生成数据,发布生产环境前,如果开发环境有配置数据需要更新数据包,可以开启生成数据包,使用完记得关闭
-  //开启生成数据前先关闭syncStructure syncData createDb
+  //开启生成数据前先关闭createDb syncStructure syncData sysUpdateData
   //生成数据,回写InitData/Admin/*.json
   "generateData": false,
 

+ 50 - 0
src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json

@@ -186,6 +186,36 @@
             "description": "",
             "sort": 156,
             "enabled": true
+          },
+          {
+            "id": 394672333692998,
+            "parentId": 161227167719493,
+            "label": "查询用户个人信息",
+            "path": "/api/admin/auth/get-user-profile",
+            "httpMethods": "get",
+            "description": "",
+            "sort": 154,
+            "enabled": true
+          },
+          {
+            "id": 394672333692999,
+            "parentId": 161227167719493,
+            "label": "查询用户菜单列表",
+            "path": "/api/admin/auth/get-user-menus",
+            "httpMethods": "get",
+            "description": "",
+            "sort": 155,
+            "enabled": true
+          },
+          {
+            "id": 394672333697093,
+            "parentId": 161227167719493,
+            "label": "查询用户权限列表",
+            "path": "/api/admin/auth/get-user-permissions",
+            "httpMethods": "get",
+            "description": "",
+            "sort": 156,
+            "enabled": true
           }
         ]
       },
@@ -810,6 +840,16 @@
             "description": "",
             "sort": 140,
             "enabled": true
+          },
+          {
+            "id": 394672333692997,
+            "parentId": 161227167719497,
+            "label": "设置启用",
+            "path": "/api/admin/user/set-enable",
+            "httpMethods": "post",
+            "description": "",
+            "sort": 147,
+            "enabled": true
           }
         ]
       },
@@ -1256,6 +1296,16 @@
             "description": "",
             "sort": 92,
             "enabled": true
+          },
+          {
+            "id": 394672333688901,
+            "parentId": 161227167723593,
+            "label": "设置启用",
+            "path": "/api/admin/tenant/set-enable",
+            "httpMethods": "post",
+            "description": "",
+            "sort": 95,
+            "enabled": true
           }
         ]
       },

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

@@ -2,7 +2,7 @@
   {
     "id": 189097691009093,
     "name": "中台",
-    "code": "",
+    "code": "zhontai",
     "value": "",
     "enabled": true,
     "sort": 1,

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

@@ -3,7 +3,7 @@
     "id": 189097691009093,
     "tenantId": 161223412138053,
     "name": "中台",
-    "code": "",
+    "code": "zhontai",
     "value": "",
     "enabled": true,
     "sort": 1,

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

@@ -145,6 +145,17 @@
                 "description": "",
                 "enabled": true,
                 "childs": []
+              },
+              {
+                "id": 394672570462277,
+                "parentId": 161227168636998,
+                "label": "禁用",
+                "code": "api:admin:user:set-enable",
+                "type": 3,
+                "isKeepAlive": true,
+                "sort": 8,
+                "enabled": true,
+                "childs": []
               }
             ]
           },
@@ -454,6 +465,17 @@
                 "description": "",
                 "enabled": true,
                 "childs": []
+              },
+              {
+                "id": 394672685342789,
+                "parentId": 161227168751685,
+                "label": "禁用",
+                "code": "api:admin:tenant:set-enable",
+                "type": 3,
+                "isKeepAlive": true,
+                "sort": 8,
+                "enabled": true,
+                "childs": []
               }
             ]
           },

+ 10 - 0
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json

@@ -612,5 +612,15 @@
     "id": 372393512312901,
     "permissionId": 372031447494725,
     "apiId": 372031353708613
+  },
+  {
+    "id": 394676138577989,
+    "permissionId": 394672570462277,
+    "apiId": 394672333692997
+  },
+  {
+    "id": 394676175425605,
+    "permissionId": 394672685342789,
+    "apiId": 394672333688901
   }
 ]

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

@@ -1,12 +1,8 @@
 [
   {
     "id": 161223412138053,
-    "name": "中台",
-    "code": "zhontai",
-    "realName": "小雪",
-    "phone": "13122223333",
-    "email": "xiaoxue@zhontai.com",
     "userId": 161223411986501,
+    "orgId": 189097691009093,
     "tenantType": 1,
     "dbKey": "masterdb",
     "connectionString": "",

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

@@ -8,6 +8,7 @@
     "email": "xiaoxue@zhontai.com",
     "orgId": 189097691009093,
     "nickName": "小雪转中雪",
-    "type": 100
+    "type": 100,
+    "enabled": true
   }
 ]

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

@@ -9,6 +9,7 @@
     "email": "xiaoxue@zhontai.com",
     "orgId": 189097691009093,
     "nickName": "小雪转中雪",
-    "type": 100
+    "type": 100,
+    "enabled": true
   }
 ]

+ 9 - 28
src/platform/ZhonTai.Admin/Domain/Tenant/TenantEntity.cs

@@ -1,8 +1,8 @@
 using ZhonTai.Admin.Core.Entities;
 using FreeSql;
 using FreeSql.DataAnnotations;
-using System;
 using ZhonTai.Admin.Domain.User;
+using ZhonTai.Admin.Domain.Org;
 
 namespace ZhonTai.Admin.Domain.Tenant;
 
@@ -10,46 +10,27 @@ namespace ZhonTai.Admin.Domain.Tenant;
 /// 租户
 /// </summary>
 [Table(Name = "ad_tenant")]
-[Index("idx_{tablename}_01", nameof(Name), true)]
-[Index("idx_{tablename}_02", nameof(Code), true)]
 public partial class TenantEntity : EntityBase
 {
     /// <summary>
-    /// 企业名称
-    /// </summary>
-    [Column(StringLength = 50)]
-    public string Name { get; set; }
-
-    /// <summary>
-    /// 编码
-    /// </summary>
-    [Column(StringLength = 50)]
-    public string Code { get; set; }
-
-    /// <summary>
-    /// 姓名
+    /// 授权用户
     /// </summary>
-    [Column(StringLength = 50)]
-    public string RealName { get; set; }
+    public long UserId { get; set; }
 
     /// <summary>
-    /// 手机号码
+    /// 用户
     /// </summary>
-    [Column(StringLength = 20)]
-    public string Phone { get; set; }
+    public UserEntity User { get; set; }
 
     /// <summary>
-    /// 邮箱地址
+    /// 授权部门
     /// </summary>
-    [Column(StringLength = 50)]
-    public string Email { get; set; }
+    public long OrgId { get; set; }
 
     /// <summary>
-    /// 授权用户
+    /// 部门
     /// </summary>
-    public long? UserId { get; set; }
-
-    public UserEntity User { get; set; }
+    public OrgEntity Org { get; set; }
 
     /// <summary>
     /// 租户类型

+ 11 - 1
src/platform/ZhonTai.Admin/Services/Tenant/Dto/TenantAddInput.cs

@@ -7,6 +7,11 @@ namespace ZhonTai.Admin.Services.Tenant.Dto;
 /// </summary>
 public class TenantAddInput
 {
+    /// <summary>
+    /// 租户Id
+    /// </summary>
+    public virtual long Id { get; set; }
+
     /// <summary>
     /// 企业名称
     /// </summary>
@@ -25,10 +30,15 @@ public class TenantAddInput
     [Required(ErrorMessage = "请输入姓名")]
     public string RealName { get; set; }
 
+    /// <summary>
+    /// 账号
+    /// </summary>
+    [Required(ErrorMessage = "请输入账号")]
+    public string UserName { get; set; }
+
     /// <summary>
     /// 手机号码
     /// </summary>
-    [Required(ErrorMessage = "请输入手机号码")]
     public string Phone { get; set; }
 
     /// <summary>

+ 9 - 4
src/platform/ZhonTai.Admin/Services/Tenant/Dto/TenantListOutput.cs

@@ -11,20 +11,25 @@ public class TenantListOutput
     public long Id { get; set; }
 
     /// <summary>
-    /// 企业编码
+    /// 企业名称
     /// </summary>
-    public string Code { get; set; }
+    public string Name { get; set; }
 
     /// <summary>
-    /// 企业名称
+    /// 企业编码
     /// </summary>
-    public string Name { get; set; }
+    public string Code { get; set; }
 
     /// <summary>
     /// 姓名
     /// </summary>
     public string RealName { get; set; }
 
+    /// <summary>
+    /// 账号
+    /// </summary>
+    public string UserName { get; set; }
+
     /// <summary>
     /// 手机号码
     /// </summary>

+ 2 - 2
src/platform/ZhonTai.Admin/Services/Tenant/Dto/TenantUpdateInput.cs

@@ -9,9 +9,9 @@ namespace ZhonTai.Admin.Services.Tenant.Dto;
 public partial class TenantUpdateInput : TenantAddInput
 {
     /// <summary>
-    /// 接口Id
+    /// 租户Id
     /// </summary>
     [Required]
     [ValidateRequired("请选择租户")]
-    public long Id { get; set; }
+    public override long Id { get; set; }
 }

+ 349 - 168
src/platform/ZhonTai.Admin/Services/Tenant/TenantService.cs

@@ -18,6 +18,13 @@ using ZhonTai.Admin.Core.Configs;
 using ZhonTai.Admin.Domain.Org;
 using ZhonTai.Admin.Domain.UserStaff;
 using ZhonTai.Admin.Domain.UserOrg;
+using Microsoft.AspNetCore.Identity;
+using System.Linq.Expressions;
+using System;
+using System.Collections.Generic;
+using System.Security.Policy;
+using System.Xml.Linq;
+using Yitter.IdGenerator;
 
 namespace ZhonTai.Admin.Services.Tenant;
 
@@ -37,6 +44,7 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     private IRolePermissionRepository _rolePermissionRepository => LazyGetRequiredService<IRolePermissionRepository>();
     private IUserStaffRepository _userStaffRepository => LazyGetRequiredService<IUserStaffRepository>();
     private IUserOrgRepository _userOrgRepository => LazyGetRequiredService<IUserOrgRepository>();
+    private IPasswordHasher<UserEntity> _passwordHasher => LazyGetRequiredService<IPasswordHasher<UserEntity>>();
 
     public TenantService()
     {
@@ -49,8 +57,21 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     /// <returns></returns>
     public async Task<TenantGetOutput> GetAsync(long id)
     {
-        var result = await _tenantRepository.GetAsync<TenantGetOutput>(id);
-        return result;
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
+        {
+            var tenant = await _tenantRepository.Select
+            .WhereDynamic(id)
+            .FirstAsync(a => new TenantGetOutput
+            {
+                Name = a.Org.Name,
+                Code = a.Org.Code,
+                UserName = a.User.UserName,
+                RealName = a.User.Name,
+                Phone = a.User.Mobile,
+                Email = a.User.Email,
+            });
+            return tenant;
+        }
     }
 
     /// <summary>
@@ -61,23 +82,34 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     [HttpPost]
     public async Task<PageOutput<TenantListOutput>> GetPageAsync(PageInput<TenantGetPageDto> input)
     {
-        var key = input.Filter?.Name;
-
-        var list = await _tenantRepository.Select
-        .WhereDynamicFilter(input.DynamicFilter)
-        .WhereIf(key.NotNull(), a => a.Name.Contains(key))
-        .Count(out var total)
-        .OrderByDescending(true, c => c.Id)
-        .Page(input.CurrentPage, input.PageSize)
-        .ToListAsync<TenantListOutput>();
-
-        var data = new PageOutput<TenantListOutput>()
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
         {
-            List = list,
-            Total = total
-        };
-
-        return data;
+            var key = input.Filter?.Name;
+
+            var list = await _tenantRepository.Select
+            .WhereDynamicFilter(input.DynamicFilter)
+            .WhereIf(key.NotNull(), a => a.Org.Name.Contains(key))
+            .Count(out var total)
+            .OrderByDescending(true, a => a.Id)
+            .Page(input.CurrentPage, input.PageSize)
+            .ToListAsync(a => new TenantListOutput
+            {
+                Name = a.Org.Name,
+                Code = a.Org.Code,
+                UserName = a.User.UserName,
+                RealName = a.User.Name,
+                Phone = a.User.Mobile,
+                Email = a.User.Email,
+            });
+
+            var data = new PageOutput<TenantListOutput>()
+            {
+                List = list,
+                Total = total
+            };
+
+            return data;
+        }
     }
 
     /// <summary>
@@ -88,104 +120,172 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     [AdminTransaction]
     public virtual async Task<long> AddAsync(TenantAddInput input)
     {
-        if (await _tenantRepository.Select.AnyAsync(a => a.Name == input.Name))
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
         {
-            throw ResultOutput.Exception($"企业名称已存在");
+            var existsOrg = await _orgRepository.Select
+            .Where(a => (a.Name == input.Name || a.Code == input.Code) && a.ParentId == 0)
+            .FirstAsync(a => new { a.Name, a.Code });
+
+            if (existsOrg != null)
+            {
+                if (existsOrg.Name == input.Name)
+                {
+                    throw ResultOutput.Exception($"企业名称已存在");
+                }
+
+                if (existsOrg.Code == input.Code)
+                {
+                    throw ResultOutput.Exception($"企业编码已存在");
+                }
+            }
+
+            Expression<Func<UserEntity, bool>> where = (a => a.UserName == input.UserName);
+            where = where.Or(input.Phone.NotNull(), a => a.Mobile == input.Phone)
+                .Or(input.Email.NotNull(), a => a.Email == input.Email);
+
+            var existsUser = await _userRepository.Select.Where(where)
+                .FirstAsync(a => new { a.UserName, a.Mobile, a.Email });
+
+            if (existsUser != null)
+            {
+                if (existsUser.UserName == input.UserName)
+                {
+                    throw ResultOutput.Exception($"企业账号已存在");
+                }
+
+                if (input.Phone.NotNull() && existsUser.Mobile == input.Phone)
+                {
+                    throw ResultOutput.Exception($"企业手机号已存在");
+                }
+
+                if (input.Email.NotNull() && existsUser.Email == input.Email)
+                {
+                    throw ResultOutput.Exception($"企业邮箱已存在");
+                }
+            }
+
+            //添加租户
+            TenantEntity entity = Mapper.Map<TenantEntity>(input);
+            TenantEntity tenant = await _tenantRepository.InsertAsync(entity);
+            long tenantId = tenant.Id;
+
+            //添加部门
+            var org = new OrgEntity
+            {
+                TenantId = tenantId,
+                Name = input.Name,
+                Code = input.Code,
+                ParentId = 0,
+                MemberCount = 1,
+                Sort = 1,
+                Enabled = true
+            };
+            await _orgRepository.InsertAsync(org);
+
+            //添加用户
+            var user = new UserEntity
+            {
+                TenantId = tenantId,
+                UserName = input.UserName,
+                Name = input.RealName,
+                Mobile = input.Phone,
+                Email = input.Email,
+                Type = UserType.TenantAdmin,
+                OrgId = org.Id,
+                Enabled = true
+            };
+            if (_appConfig.PasswordHasher)
+            {
+                user.Password = _passwordHasher.HashPassword(user, _appConfig.DefaultPassword);
+                user.PasswordEncryptType = PasswordEncryptType.PasswordHasher;
+            }
+            else
+            {
+                user.Password = MD5Encrypt.Encrypt32(_appConfig.DefaultPassword);
+                user.PasswordEncryptType = PasswordEncryptType.MD5Encrypt32;
+            }
+            await _userRepository.InsertAsync(user);
+
+            long userId = user.Id;
+
+            //添加用户员工
+            var emp = new UserStaffEntity
+            {
+                Id = userId,
+                TenantId = tenantId
+            };
+            await _userStaffRepository.InsertAsync(emp);
+
+            //添加用户部门
+            var userOrg = new UserOrgEntity
+            {
+                UserId = userId,
+                OrgId = org.Id
+            };
+            await _userOrgRepository.InsertAsync(userOrg);
+
+            //添加角色分组和角色
+            var roleGroupId = YitIdHelper.NextId();
+            var roleId = YitIdHelper.NextId();
+            var jobGroupId = YitIdHelper.NextId();
+            var roles = new List<RoleEntity>{
+                new RoleEntity
+                {
+                    Id = roleGroupId,
+                    ParentId = 0,
+                    TenantId = tenantId,
+                    Type = RoleType.Group,
+                    Name = "系统默认",
+                    Sort = 1
+                },
+                new RoleEntity
+                {
+                    Id = roleId,
+                    TenantId = tenantId,
+                    Type = RoleType.Role,
+                    Name = "主管理员",
+                    Code = "main-admin",
+                    ParentId = roleGroupId,
+                    DataScope = DataScope.All,
+                    Sort = 1
+                },
+                new RoleEntity
+                {
+                    Id= jobGroupId,
+                    ParentId = 0,
+                    TenantId = tenantId,
+                    Type = RoleType.Group,
+                    Name = "岗位",
+                    Sort = 2
+                },
+                new RoleEntity
+                {
+                    TenantId = tenantId,
+                    Type = RoleType.Role,
+                    Name = "普通员工",
+                    Code = "emp",
+                    ParentId = jobGroupId,
+                    DataScope = DataScope.All,
+                    Sort = 2
+                }
+            };
+            await _roleRepository.InsertAsync(roles);
+
+            //添加用户角色
+            var userRole = new UserRoleEntity()
+            {
+                UserId = userId,
+                RoleId = roleId
+            };
+            await _userRoleRepository.InsertAsync(userRole);
+
+            //更新租户的用户和部门
+            tenant.UserId = userId;
+            tenant.OrgId = org.Id;
+            await _tenantRepository.UpdateAsync(tenant);
+
+            return tenant.Id;
         }
-
-        if (await _tenantRepository.Select.AnyAsync(a => a.Code == input.Code))
-        {
-            throw ResultOutput.Exception($"企业编码已存在");
-        }
-
-        //添加租户
-        TenantEntity entity = Mapper.Map<TenantEntity>(input);
-        TenantEntity tenant = await _tenantRepository.InsertAsync(entity);
-        long tenantId = tenant.Id;
-        
-        //添加部门
-        var org = new OrgEntity
-        {
-            TenantId = tenantId,
-            Name = input.Name,
-            Code = input.Code,
-            ParentId = 0,
-            MemberCount = 1,
-            Sort = 1
-        };
-        await _orgRepository.InsertAsync(org);
-
-        //添加主管理员
-        string pwd = MD5Encrypt.Encrypt32(_appConfig.DefaultPassword);
-        var user = new UserEntity
-        {
-            TenantId = tenantId,
-            UserName = input.Phone,
-            Password = pwd,
-            Name = input.RealName,
-            Mobile = input.Phone,
-            Email = input.Email,
-            Enabled = true,
-            Type = UserType.TenantAdmin,
-            OrgId = org.Id
-        };
-        await _userRepository.InsertAsync(user);
-
-        long userId = user.Id;
-
-        //添加员工
-        var emp = new UserStaffEntity
-        {
-            Id = userId,
-            TenantId = tenantId
-        };
-        await _userStaffRepository.InsertAsync(emp);
-
-        //添加用户部门
-        var userOrg = new UserOrgEntity
-        {
-            UserId = userId,
-            OrgId = org.Id
-        };
-        await _userOrgRepository.InsertAsync(userOrg);
-
-        //添加角色分组
-        var roleGroup = new RoleEntity
-        {
-            ParentId = 0,
-            TenantId = tenantId,
-            Type = RoleType.Group,
-            Name = "系统默认",
-            Sort = 1
-        };
-        await _roleRepository.InsertAsync(roleGroup);
-
-        //添加角色
-        var role = new RoleEntity
-        {
-            TenantId = tenantId,
-            Type = RoleType.Role,
-            Name = "主管理员",
-            Code = "main-admin",
-            ParentId = roleGroup.Id,
-            DataScope = DataScope.All,
-            Sort = 1
-        };
-        await _roleRepository.InsertAsync(role);
-
-        //添加用户角色
-        var userRole = new UserRoleEntity()
-        {
-            UserId = userId,
-            RoleId = role.Id
-        };
-        await _userRoleRepository.InsertAsync(userRole);
-
-        //更新租户的用户
-        tenant.UserId = userId;
-        await _tenantRepository.UpdateAsync(tenant);
-
-        return tenant.Id;
     }
 
     /// <summary>
@@ -195,24 +295,87 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     /// <returns></returns>
     public async Task UpdateAsync(TenantUpdateInput input)
     {
-        if (await _tenantRepository.Select.AnyAsync(a => a.Id != input.Id && a.Name == input.Name))
-        {
-            throw ResultOutput.Exception($"企业名称已存在");
-        }
-
-        if (await _tenantRepository.Select.AnyAsync(a => a.Id != input.Id && a.Code == input.Code))
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
         {
-            throw ResultOutput.Exception($"企业编码已存在");
+            var tenant = await _tenantRepository.GetAsync(input.Id);
+            if (!(tenant?.Id > 0))
+            {
+                throw ResultOutput.Exception("租户不存在");
+            }
+
+            var existsOrg = await _orgRepository.Select
+                .Where(a => a.Id != tenant.OrgId && (a.Name == input.Name || a.Code == input.Code))
+                .FirstAsync(a => new { a.Name, a.Code });
+
+            if (existsOrg != null)
+            {
+                if (existsOrg.Name == input.Name)
+                {
+                    throw ResultOutput.Exception($"企业名称已存在");
+                }
+
+                if (existsOrg.Code == input.Code)
+                {
+                    throw ResultOutput.Exception($"企业编码已存在");
+                }
+            }
+
+            Expression<Func<UserEntity, bool>> where = (a => a.UserName == input.UserName);
+            where = where.Or(input.Phone.NotNull(), a => a.Mobile == input.Phone)
+                .Or(input.Email.NotNull(), a => a.Email == input.Email);
+
+            var existsUser = await _userRepository.Select.Where(a => a.Id != tenant.UserId).Where(where)
+                .FirstAsync(a => new { a.Id, a.Name, a.UserName, a.Mobile, a.Email });
+
+            if (existsUser != null)
+            {
+                if (existsUser.UserName == input.UserName)
+                {
+                    throw ResultOutput.Exception($"企业账号已存在");
+                }
+
+                if (input.Phone.NotNull() && existsUser.Mobile == input.Phone)
+                {
+                    throw ResultOutput.Exception($"企业手机号已存在");
+                }
+
+                if (input.Email.NotNull() && existsUser.Email == input.Email)
+                {
+                    throw ResultOutput.Exception($"企业邮箱已存在");
+                }
+            }
+
+            //更新用户
+            await _userRepository.UpdateDiy.DisableGlobalFilter(FilterNames.Tenant).SetSource(
+            new UserEntity()
+            {
+                Id = tenant.UserId,
+                Name = input.RealName,
+                UserName = input.UserName,
+                Mobile = input.Phone,
+                Email = input.Email
+            })
+            .UpdateColumns(a => new { a.Name, a.UserName, a.Mobile, a.Email, a.ModifiedTime }).ExecuteAffrowsAsync();
+
+            //更新部门
+            await _orgRepository.UpdateDiy.DisableGlobalFilter(FilterNames.Tenant).SetSource(
+            new OrgEntity()
+            {
+                Id = tenant.OrgId,
+                Name = input.Name,
+                Code = input.Code
+            })
+            .UpdateColumns(a => new { a.Name, a.Code, a.ModifiedTime }).ExecuteAffrowsAsync();
+
+            //更新租户
+            await _tenantRepository.UpdateDiy.DisableGlobalFilter(FilterNames.Tenant).SetSource(
+            new TenantEntity()
+            {
+                Id = tenant.Id,
+                Description = input.Description,
+            })
+            .UpdateColumns(a => new { a.Description, a.ModifiedTime }).ExecuteAffrowsAsync();
         }
-
-        var entity = await _tenantRepository.GetAsync(input.Id);
-        if (!(entity?.Id > 0))
-        {
-            throw ResultOutput.Exception("租户不存在");
-        }
-
-        Mapper.Map(input, entity);
-        await _tenantRepository.UpdateAsync(entity);
     }
 
     /// <summary>
@@ -223,32 +386,38 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     [AdminTransaction]
     public virtual async Task DeleteAsync(long id)
     {
-        var tenantType = await _tenantRepository.Select.WhereDynamic(id).ToOneAsync(a => a.TenantType);
-        if(tenantType == TenantType.Platform)
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
         {
-            throw ResultOutput.Exception("平台租户禁止删除");
-        }
+            var tenantType = await _tenantRepository.Select.WhereDynamic(id).ToOneAsync(a => a.TenantType);
+            if (tenantType == TenantType.Platform)
+            {
+                throw ResultOutput.Exception("平台租户禁止删除");
+            }
+
+            //删除角色权限
+            await _rolePermissionRepository.Where(a => a.Role.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除角色权限
-        await _rolePermissionRepository.Where(a => a.Role.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
+            //删除用户角色
+            await _userRoleRepository.Where(a => a.User.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除用户角色
-        await _userRoleRepository.Where(a => a.User.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
+            //删除员工
+            await _userStaffRepository.Where(a => a.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除员工
-        await _userStaffRepository.Where(a => a.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
+            //删除用户部门
+            await _userOrgRepository.Where(a => a.User.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除用户部门
-        await _userOrgRepository.Where(a => a.User.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
+            //删除部门
+            await _orgRepository.Where(a => a.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除用户
-        await _userRepository.Where(a => a.TenantId == id && a.Type != UserType.Member).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
+            //删除用户
+            await _userRepository.Where(a => a.TenantId == id && a.Type != UserType.Member).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除角色
-        await _roleRepository.Where(a => a.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
+            //删除角色
+            await _roleRepository.Where(a => a.TenantId == id).DisableGlobalFilter(FilterNames.Tenant).ToDelete().ExecuteAffrowsAsync();
 
-        //删除租户
-        await _tenantRepository.DeleteAsync(id);
+            //删除租户
+            await _tenantRepository.DeleteAsync(id);
+        }
     }
 
     /// <summary>
@@ -259,20 +428,26 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     [AdminTransaction]
     public virtual async Task SoftDeleteAsync(long id)
     {
-        var tenantType = await _tenantRepository.Select.WhereDynamic(id).ToOneAsync(a => a.TenantType);
-        if (tenantType == TenantType.Platform)
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
         {
-            throw ResultOutput.Exception("平台租户禁止删除");
-        }
+            var tenantType = await _tenantRepository.Select.WhereDynamic(id).ToOneAsync(a => a.TenantType);
+            if (tenantType == TenantType.Platform)
+            {
+                throw ResultOutput.Exception("平台租户禁止删除");
+            }
+
+            //删除部门
+            await _orgRepository.SoftDeleteAsync(a => a.TenantId == id, FilterNames.Tenant);
 
-        //删除用户
-        await _userRepository.SoftDeleteAsync(a => a.TenantId == id && a.Type != UserType.Member, FilterNames.Tenant);
+            //删除用户
+            await _userRepository.SoftDeleteAsync(a => a.TenantId == id && a.Type != UserType.Member, FilterNames.Tenant);
 
-        //删除角色
-        await _roleRepository.SoftDeleteAsync(a => a.TenantId == id, FilterNames.Tenant);
+            //删除角色
+            await _roleRepository.SoftDeleteAsync(a => a.TenantId == id, FilterNames.Tenant);
 
-        //删除租户
-        var result = await _tenantRepository.SoftDeleteAsync(id);
+            //删除租户
+            var result = await _tenantRepository.SoftDeleteAsync(id);
+        }
     }
 
     /// <summary>
@@ -283,20 +458,26 @@ public class TenantService : BaseService, ITenantService, IDynamicApi
     [AdminTransaction]
     public virtual async Task BatchSoftDeleteAsync(long[] ids)
     {
-        var tenantType = await _tenantRepository.Select.WhereDynamic(ids).ToOneAsync(a => a.TenantType);
-        if (tenantType == TenantType.Platform)
+        using (_tenantRepository.DataFilter.Disable(FilterNames.Tenant))
         {
-            throw ResultOutput.Exception("平台租户禁止删除");
-        }
+            var tenantType = await _tenantRepository.Select.WhereDynamic(ids).ToOneAsync(a => a.TenantType);
+            if (tenantType == TenantType.Platform)
+            {
+                throw ResultOutput.Exception("平台租户禁止删除");
+            }
 
-        //删除用户
-        await _userRepository.SoftDeleteAsync(a => ids.Contains(a.TenantId.Value) && a.Type != UserType.Member, FilterNames.Tenant);
+            //删除部门
+            await _orgRepository.SoftDeleteAsync(a => ids.Contains(a.TenantId.Value), FilterNames.Tenant);
 
-        //删除角色
-        await _roleRepository.SoftDeleteAsync(a => ids.Contains(a.TenantId.Value), FilterNames.Tenant);
+            //删除用户
+            await _userRepository.SoftDeleteAsync(a => ids.Contains(a.TenantId.Value) && a.Type != UserType.Member, FilterNames.Tenant);
 
-        //删除租户
-        var result = await _tenantRepository.SoftDeleteAsync(ids);
+            //删除角色
+            await _roleRepository.SoftDeleteAsync(a => ids.Contains(a.TenantId.Value), FilterNames.Tenant);
+
+            //删除租户
+            var result = await _tenantRepository.SoftDeleteAsync(ids);
+        }
     }
 
     /// <summary>

+ 0 - 4
src/platform/ZhonTai.Admin/Services/User/Dto/UserAddInput.cs

@@ -7,10 +7,6 @@ namespace ZhonTai.Admin.Services.User.Dto;
 /// </summary>
 public class UserAddInput: UserFormInput
 {
-    /// <summary>
-    /// 密码
-    /// </summary>
-    [Required(ErrorMessage = "请输入密码")]
     public virtual string Password { get; set; }
 
     /// <summary>

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

@@ -32,6 +32,9 @@ using ZhonTai.Admin.Domain.UserOrg;
 using Microsoft.AspNetCore.Identity;
 using ZhonTai.Admin.Services.File;
 using ZhonTai.Admin.Core.Auth;
+using System.Linq.Expressions;
+using System;
+using ZhonTai.Admin.Core.Entities;
 
 namespace ZhonTai.Admin.Services.User;
 
@@ -116,7 +119,9 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
 
         if(orgId.HasValue && orgId > 0)
         {
-            var managerUserIds = await _userOrgRepository.Select.Where(a => a.OrgId == orgId && a.IsManager == true).ToListAsync(a => a.UserId);
+            var managerUserIds = await _userOrgRepository.Select
+                .Where(a => a.OrgId == orgId && a.IsManager == true).ToListAsync(a => a.UserId);
+
             if (managerUserIds.Any())
             {
                 var managerUsers = list.Where(a => managerUserIds.Contains(a.Id));
@@ -297,19 +302,29 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
     [AdminTransaction]
     public virtual async Task<long> AddAsync(UserAddInput input)
     {
-        if (await _userRepository.Select.AnyAsync(a => a.UserName == input.UserName))
-        {
-            throw ResultOutput.Exception($"账号已存在");
-        }
+        Expression<Func<UserEntity, bool>> where = (a => a.UserName == input.UserName);
+        where = where.Or(input.Mobile.NotNull(), a => a.Mobile == input.Mobile)
+            .Or(input.Email.NotNull(), a => a.Email == input.Email);
 
-        if (input.Mobile.NotNull() && await _userRepository.Select.AnyAsync(a => a.Mobile == input.Mobile))
-        {
-            throw ResultOutput.Exception($"手机号已存在");
-        }
+        var existsUser = await _userRepository.Select.Where(where)
+            .FirstAsync(a => new { a.UserName, a.Mobile, a.Email });
 
-        if (input.Email.NotNull() && await _userRepository.Select.AnyAsync(a => a.Email == input.Email))
+        if (existsUser != null)
         {
-            throw ResultOutput.Exception($"邮箱已存在");
+            if (existsUser.UserName == input.UserName)
+            {
+                throw ResultOutput.Exception($"账号已存在");
+            }
+
+            if (input.Mobile.NotNull() && existsUser.Mobile == input.Mobile)
+            {
+                throw ResultOutput.Exception($"手机号已存在");
+            }
+
+            if (input.Email.NotNull() && existsUser.Email == input.Email)
+            {
+                throw ResultOutput.Exception($"邮箱已存在");
+            }
         }
 
         // 用户信息
@@ -336,10 +351,10 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
         //用户角色
         if (input.RoleIds != null && input.RoleIds.Any())
         {
-            var roles = input.RoleIds.Select(roleId => new UserRoleEntity 
+            var roles = input.RoleIds.Select(roleId => new UserRoleEntity
             { 
-                UserId = userId, 
-                RoleId = roleId 
+                UserId = userId,
+                RoleId = roleId
             }).ToList();
             await _userRoleRepository.InsertAsync(roles);
         }
@@ -372,19 +387,29 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
     {
         using (_userRepository.DataFilter.DisableAll())
         {
-            if (await _userRepository.Select.AnyAsync(a => a.UserName == input.UserName))
-            {
-                throw ResultOutput.Exception($"账号已存在");
-            }
+            Expression<Func<UserEntity, bool>> where = (a => a.UserName == input.UserName);
+            where = where.Or(input.Mobile.NotNull(), a => a.Mobile == input.Mobile)
+                .Or(input.Email.NotNull(), a => a.Email == input.Email);
 
-            if (input.Mobile.NotNull() && await _userRepository.Select.AnyAsync(a => a.Mobile == input.Mobile))
-            {
-                throw ResultOutput.Exception($"手机号已存在");
-            }
+            var existsUser = await _userRepository.Select.Where(where)
+                .FirstAsync(a => new { a.UserName, a.Mobile, a.Email });
 
-            if (input.Email.NotNull() && await _userRepository.Select.AnyAsync(a => a.Email == input.Email))
+            if (existsUser != null)
             {
-                throw ResultOutput.Exception($"邮箱已存在");
+                if (existsUser.UserName == input.UserName)
+                {
+                    throw ResultOutput.Exception($"账号已存在");
+                }
+
+                if (input.Mobile.NotNull() && existsUser.Mobile == input.Mobile)
+                {
+                    throw ResultOutput.Exception($"手机号已存在");
+                }
+
+                if (input.Email.NotNull() && existsUser.Email == input.Email)
+                {
+                    throw ResultOutput.Exception($"邮箱已存在");
+                }
             }
 
             // 用户信息
@@ -419,25 +444,35 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
     [AdminTransaction]
     public virtual async Task UpdateMemberAsync(UserUpdateMemberInput input)
     {
-        var user = await _userRepository.GetAsync(input.Id);
-        if (!(user?.Id > 0))
-        {
-            throw ResultOutput.Exception("用户不存在");
-        }
+        Expression<Func<UserEntity, bool>> where = (a => a.UserName == input.UserName);
+        where = where.Or(input.Mobile.NotNull(), a => a.Mobile == input.Mobile)
+            .Or(input.Email.NotNull(), a => a.Email == input.Email);
 
-        if (await _userRepository.Select.AnyAsync(a => a.Id != input.Id && a.UserName == input.UserName))
-        {
-            throw ResultOutput.Exception($"账号已存在");
-        }
+        var existsUser = await _userRepository.Select.Where(a => a.Id != input.Id).Where(where)
+            .FirstAsync(a => new { a.UserName, a.Mobile, a.Email });
 
-        if (input.Mobile.NotNull() && await _userRepository.Select.AnyAsync(a => a.Id != input.Id && a.Mobile == input.Mobile))
+        if (existsUser != null)
         {
-            throw ResultOutput.Exception($"手机号已存在");
+            if (existsUser.UserName == input.UserName)
+            {
+                throw ResultOutput.Exception($"账号已存在");
+            }
+
+            if (input.Mobile.NotNull() && existsUser.Mobile == input.Mobile)
+            {
+                throw ResultOutput.Exception($"手机号已存在");
+            }
+
+            if (input.Email.NotNull() && existsUser.Email == input.Email)
+            {
+                throw ResultOutput.Exception($"邮箱已存在");
+            }
         }
 
-        if (input.Email.NotNull() && await _userRepository.Select.AnyAsync(a => a.Id != input.Id && a.Email == input.Email))
+        var user = await _userRepository.GetAsync(input.Id);
+        if (!(user?.Id > 0))
         {
-            throw ResultOutput.Exception($"邮箱已存在");
+            throw ResultOutput.Exception("用户不存在");
         }
 
         Mapper.Map(input, user);
@@ -452,30 +487,40 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
     [AdminTransaction]
     public virtual async Task UpdateAsync(UserUpdateInput input)
     {
-        var user = await _userRepository.GetAsync(input.Id);
-        if (!(user?.Id > 0))
-        {
-            throw ResultOutput.Exception("用户不存在");
-        }
-
         if (input.Id == input.ManagerUserId)
         {
             throw ResultOutput.Exception("直属主管不能是自己");
         }
 
-        if (await _userRepository.Select.AnyAsync(a => a.Id != input.Id && a.UserName == input.UserName))
-        {
-            throw ResultOutput.Exception($"账号已存在");
-        }
+        Expression<Func<UserEntity, bool>> where = (a => a.UserName == input.UserName);
+        where = where.Or(input.Mobile.NotNull(), a => a.Mobile == input.Mobile)
+            .Or(input.Email.NotNull(), a => a.Email == input.Email);
+
+        var existsUser = await _userRepository.Select.Where(a => a.Id != input.Id).Where(where)
+            .FirstAsync(a => new { a.UserName, a.Mobile, a.Email });
 
-        if (input.Mobile.NotNull() && await _userRepository.Select.AnyAsync(a => a.Id != input.Id && a.Mobile == input.Mobile))
+        if (existsUser != null)
         {
-            throw ResultOutput.Exception($"手机号已存在");
+            if (existsUser.UserName == input.UserName)
+            {
+                throw ResultOutput.Exception($"账号已存在");
+            }
+
+            if (input.Mobile.NotNull() && existsUser.Mobile == input.Mobile)
+            {
+                throw ResultOutput.Exception($"手机号已存在");
+            }
+
+            if (input.Email.NotNull() && existsUser.Email == input.Email)
+            {
+                throw ResultOutput.Exception($"邮箱已存在");
+            }
         }
 
-        if (input.Email.NotNull() && await _userRepository.Select.AnyAsync(a => a.Id != input.Id && a.Email == input.Email))
+        var user = await _userRepository.GetAsync(input.Id);
+        if (!(user?.Id > 0))
         {
-            throw ResultOutput.Exception($"邮箱已存在");
+            throw ResultOutput.Exception("用户不存在");
         }
 
         Mapper.Map(input, user);
@@ -629,7 +674,7 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
 
         if(user.Type == UserType.PlatformAdmin || user.Type == UserType.TenantAdmin)
         {
-            throw ResultOutput.Exception("平台管理员禁止删除");
+            throw ResultOutput.Exception($"平台管理员禁止删除");
         }
 
         //删除用户角色
@@ -641,6 +686,7 @@ public partial class UserService : BaseService, IUserService, IDynamicApi
         //删除用户
         await _userRepository.DeleteAsync(a => a.Id == id);
 
+        //删除用户数据权限缓存
         await Cache.DelAsync(CacheKeys.DataPermission + id);
     }
 

+ 8 - 8
src/platform/ZhonTai.Admin/ZhonTai.Admin.csproj

@@ -16,9 +16,9 @@
 		<PackageReference Include="FluentValidation.AspNetCore" Version="11.2.2" />
 		<PackageReference Include="FreeRedis" Version="1.0.7" />
 		<PackageReference Include="FreeRedis.DistributedCache" Version="1.0.5" />
-		<PackageReference Include="FreeSql" Version="3.2.690" />
+		<PackageReference Include="FreeSql" Version="3.2.691" />
 		<PackageReference Include="FreeSql.Cloud" Version="1.6.3" />
-		<PackageReference Include="FreeSql.Repository" Version="3.2.690" />
+		<PackageReference Include="FreeSql.Repository" Version="3.2.691" />
 		<PackageReference Include="FreeScheduler" Version="1.0.9" />
 		<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
 		<PackageReference Include="Mapster" Version="7.3.0" />
@@ -37,12 +37,12 @@
 	</ItemGroup>
 
 	<ItemGroup Condition="'$(Configuration)'=='Debug'">
-		<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.690" />
-		<PackageReference Include="FreeSql.Provider.SqlServer" Version="3.2.690" />
-		<PackageReference Include="FreeSql.Provider.PostgreSQL" Version="3.2.690" />
-		<PackageReference Include="FreeSql.Provider.Oracle" Version="3.2.690" />
-		<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.690" />
-		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.690" />
+		<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.691" />
+		<PackageReference Include="FreeSql.Provider.SqlServer" Version="3.2.691" />
+		<PackageReference Include="FreeSql.Provider.PostgreSQL" Version="3.2.691" />
+		<PackageReference Include="FreeSql.Provider.Oracle" Version="3.2.691" />
+		<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.691" />
+		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.691" />
 	</ItemGroup>
 
 	<ItemGroup>

+ 28 - 28
src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

@@ -2862,34 +2862,24 @@
             租户
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.Name">
-            <summary>
-            企业名称
-            </summary>
-        </member>
-        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.Code">
-            <summary>
-            编码
-            </summary>
-        </member>
-        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.RealName">
+        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.UserId">
             <summary>
-            姓名
+            授权用户
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.Phone">
+        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.User">
             <summary>
-            手机号码
+            用户
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.Email">
+        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.OrgId">
             <summary>
-            邮箱地址
+            授权部门
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.UserId">
+        <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.Org">
             <summary>
-            授权用户
+            部门
             </summary>
         </member>
         <member name="P:ZhonTai.Admin.Domain.Tenant.TenantEntity.TenantType">
@@ -6056,6 +6046,11 @@
             添加
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantAddInput.Id">
+            <summary>
+            租户Id
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantAddInput.Name">
             <summary>
             企业名称
@@ -6071,6 +6066,11 @@
             姓名
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantAddInput.UserName">
+            <summary>
+            账号
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantAddInput.Phone">
             <summary>
             手机号码
@@ -6111,14 +6111,14 @@
             主键
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.Code">
+        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.Name">
             <summary>
-            企业编码
+            企业名称
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.Name">
+        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.Code">
             <summary>
-            企业名称
+            企业编码
             </summary>
         </member>
         <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.RealName">
@@ -6126,6 +6126,11 @@
             姓名
             </summary>
         </member>
+        <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.UserName">
+            <summary>
+            账号
+            </summary>
+        </member>
         <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantListOutput.Phone">
             <summary>
             手机号码
@@ -6183,7 +6188,7 @@
         </member>
         <member name="P:ZhonTai.Admin.Services.Tenant.Dto.TenantUpdateInput.Id">
             <summary>
-            接口Id
+            租户Id
             </summary>
         </member>
         <member name="T:ZhonTai.Admin.Services.Tenant.ITenantService">
@@ -6257,11 +6262,6 @@
             添加
             </summary>
         </member>
-        <member name="P:ZhonTai.Admin.Services.User.Dto.UserAddInput.Password">
-            <summary>
-            密码
-            </summary>
-        </member>
         <member name="P:ZhonTai.Admin.Services.User.Dto.UserAddInput.Enabled">
             <summary>
             启用