xf пре 2 година
родитељ
комит
455ea63e71

+ 1 - 1
src/Hotline.Api/Controllers/UserController.cs

@@ -146,7 +146,7 @@ public class UserController : BaseController
                 ClientId = identityConfigs.ClientId,
                 UserName = userDto.UserName,
                 Email = $"{userDto.UserName}@fw.com",
-                DislayName = userDto.DisplayName ?? userDto.UserName
+                DislayName = userDto.Name ?? userDto.UserName
             }, HttpContext.RequestAborted);
             if (addAccountRsp is null || !addAccountRsp.IsSuccess)
                 throw new UserFriendlyException("identity service insert fail: AddUserAsync", "新增用户失败!");

+ 1 - 1
src/Hotline.Application.Contracts/Mappers/MapperConfigs.cs

@@ -15,7 +15,7 @@ namespace Hotline.Application.Contracts.Mappers
                 .AfterMapping((s, t) => t.InitExpired());
 
             config.NewConfig<AddUserDto, User>()
-                .Map(d => d.Name, x => x.DisplayName ?? x.UserName);
+                .Map(d => d.Name, x => x.Name ?? x.UserName);
         }
     }
 }

+ 2 - 2
src/Hotline.Share/Dtos/User/UserDto.cs

@@ -16,14 +16,14 @@ public record AddUserDto
     public string? PhoneNo { get; set; }
 
     /// <summary>
-    /// 用户名
+    /// 用户名(登录账号)
     /// </summary>
     public string UserName { get; set; }
 
     /// <summary>
     /// 展示名称
     /// </summary>
-    public string? DisplayName { get; set; }
+    public string? Name { get; set; }
 
     /// <summary>
     /// 工号