Skip to content

Commit

Permalink
:fixed : 修复用户聚合nickName字段不正确
Browse files Browse the repository at this point in the history
  • Loading branch information
KawhiWei committed Feb 16, 2022
1 parent 61f02b9 commit 4a90aa2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.2.8</Version>
<Version>1.2.9</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
//"IInterceptorsModule": "Sukt.AccountAuthority.Application.Contracts", //AOP需要代理的层;这个位置根据生成项目的名称去做代理;我这里代理的是服务接口层
"Cors": {
"PolicyName": "Sukt.Identity.Api",
"Url": "http://localhost:8080,http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084" ////支持多个域名端口,注意端口号后不要带/斜杆:比如localhost:8000/,是错的
"Url": "http://localhost:8080,http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:6017" ////支持多个域名端口,注意端口号后不要带/斜杆:比如localhost:8000/,是错的
},
"Migrations": {
"IsAutoMigration": true, //是否自动迁移
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public IdentityUserAppService(IdentityUserManager userManager, ILogger<IdentityU

public virtual async Task CreateUserAsync(IdentityUserCreateInputDto input)
{
var identityUser = new IdentityUser(input.UserName, input.Email, input.NikeName,phoneNumber:input.PhoneNumber);
var identityUser = new IdentityUser(input.UserName, input.Email, input.NickName, phoneNumber:input.PhoneNumber);
_logger.LogError($"创建用户日志打印:{identityUser.ToJson()}");

identityUser.SetPasswordHash(input.PasswordHash);
Expand All @@ -36,7 +36,7 @@ public virtual async Task UpdateUserForIdAsync(string id, IdentityUserUpdateInpu

identityUser.SetUserName(input.UserName);
identityUser.SetNormalizedUserName(input.UserName);
identityUser.SetNikeName(input.NikeName);
identityUser.SetNikeName(input.NickName);
identityUser.SetEmail(input.Email);
identityUser.SetNormalizedEmail(input.Email);
if (!input.TenantId.IsNullOrEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ protected IdentityUser() : base(SuktGuid.NewSuktGuid().ToString())
Claims = new Collection<IdentityUserClaim>();
Tokens = new Collection<IdentityUserToken>();
}
public IdentityUser(string userName, string email,string nikeName, bool isSystem = false, string sex = "", string phoneNumber="", IdentityUserTypeEnum userType = IdentityUserTypeEnum.OrdinaryUser) : this()
public IdentityUser(string userName, string email,string nickName, bool isSystem = false, string sex = "", string phoneNumber="", IdentityUserTypeEnum userType = IdentityUserTypeEnum.OrdinaryUser) : this()
{
UserName = userName;
NormalizedUserName = userName.ToUpperInvariant();
Email = email;
NormalizedEmail = email.ToUpperInvariant();
NikeName = nikeName;
NickName = nickName;
IsSystem = isSystem;
Sex = sex;
UserType = userType;
Expand All @@ -44,7 +44,7 @@ public IdentityUser(string userName, string email,string nikeName, bool isSystem
/// 用户昵称
/// </summary>
[DisplayName("用户昵称")]
public string? NikeName { get; private set; } = default!;
public string NickName { get; private set; } = default!;

/// <summary>
/// 电子邮箱
Expand Down Expand Up @@ -324,7 +324,7 @@ public virtual void SetUserName(string userName)

public virtual void SetNikeName(string nikeName)
{
NikeName = nikeName;
NickName = nikeName;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class IdentityUserDtoBase
/// <summary>
/// 用户昵称
/// </summary>
public string NikeName { get; set; }
public string NickName { get; set; }
/// <summary>
/// 电子邮箱
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class IdentityUserListDto : OutputDtoBase<string>
/// <summary>
/// 用户昵称
/// </summary>
public string NikeName { get; set; }
public string NickName { get; set; }

/// <summary>
/// 电子邮箱
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public virtual async Task<IdentityUserFromOutputDto> GetUserForIdAsync(string id
var identityUser = await _identityUserManager.FindByIdAsync(id);
return identityUser is not null ? new IdentityUserFromOutputDto()
{
NikeName = identityUser.NikeName,
NickName = identityUser.NickName,
UserName = identityUser.UserName,
PhoneNumber = identityUser.PhoneNumber,
Email = identityUser.Email,
Expand All @@ -41,7 +41,7 @@ public virtual async Task<IPageResult<IdentityUserListDto>> GetUserListAsync(Pag
{
Id = x.Id,
UserName = x.UserName,
NikeName = x.NikeName,
NickName = x.NickName,
Email = x.Email,
Sex = x.Sex,
CreatedAt = x.CreatedAt,
Expand Down

0 comments on commit 4a90aa2

Please sign in to comment.