This commit is contained in:
2026-08-31 14:42:22 +08:00
72 changed files with 2479 additions and 168 deletions
@@ -20,6 +20,7 @@ namespace IdentityService.WebApi.Applications.User
Description = u.Description,
Email = u.Email,
Id = u.Id,
NickName = u.NickName,
Phone = u.PhoneNumber,
Region = u.Region,
UserName = u.UserName
@@ -31,6 +31,16 @@ namespace IdentityService.WebApi.Applications.User
return Result<UserResponse?>.Success(mapper.Map<UserResponse>(user));
}
public async Task<Result<UserResponse?>> GetUserInfoByUnameAsync(string username)
{
var user = await repository.FindByUserNameAsync(username);
if (user is null)
{
return Result<UserResponse?>.Fail(ResultCode.USER_NOT_FOUND);
}
return Result<UserResponse?>.Success(mapper.Map<UserResponse>(user));
}
public async Task<Result<UserResponse>> UpdateAsync(UserUpdateCommand command)
{