xf 2 years ago
parent
commit
28fe2fb009

+ 3 - 2
src/Hotline.Application/Mappers/MapperConfigs.cs

@@ -23,10 +23,11 @@ namespace Hotline.Application.Mappers
                 .Map(d => d.UserName, x => x.Account.UserName)
                 .Map(d => d.OrgName, x => x.Organization.OrgName)
                 .Map(d => d.Roles, x => string.Join(',', x.Account.Roles.Select(d => d.DisplayName)))
-                .Map(d => d.State, x => x.IsDeleted ? "注销" : "正常");
+                .Map(d => d.State, x => x.IsDeleted ? "已删除" : "正常");
 
             config.NewConfig<Role, RoleDto>()
-                .Map(d => d.AccountIds, x => x.Accounts.Select(d => d.Id));
+                .Map(d => d.AccountIds, x => x.Accounts.Select(d => d.Id))
+                .Map(d => d.State, x => x.IsDeleted ? "已删除" : "正常");
         }
     }
 }

+ 1 - 0
src/Hotline.Share/Dtos/Roles/RoleDto.cs

@@ -4,6 +4,7 @@
     {
         public string Id { get; set; }
         public IReadOnlyList<string> AccountIds { get; set; }
+        public string State { get; set; }
     }
 
     public class AddRoleDto