This commit is contained in:
2026-08-31 14:42:22 +08:00
72 changed files with 2479 additions and 168 deletions
@@ -14,6 +14,35 @@ namespace GroupService.WebApi.Application.IntegrationServices
this.client = client;
}
public async Task<Result<List<UserInfoDto>>> FindByIdsAsync(List<Guid> ids)
{
try
{
var request = new GetUserListRequest();
request.UserIds.AddRange(ids.Select(x => x.ToString()));
var response = await client.GetUserListAsyncAsync(request);
var users = response.Users.Select(x => new UserInfoDto
{
Avatar = x.Avatar,
CreationTime = x.CreationTime.ToDateTimeOffset(),
Deletion = x.Deletion?.ToDateTimeOffset(),
Description = x.Description,
Email = x.Email,
Id = Guid.Parse(x.Id),
NickName = x.NickName,
Phone = x.Phone,
Region = x.Region,
UserName = x.UserName
}).ToList();
return Result.Success(users);
}catch(RpcException e)
{
return Result.Fail<List<UserInfoDto>>(ResultCode.USER_NOT_FOUND);
}
}
public async Task<Result<UserInfoDto>> FindUserByIdAsync(Guid id)
{
try