Browse Source

Merge pull request #1272 from colinin/optimize-my-sessions

feat(identity): optimize identity session query
pull/1284/head
yx lin 8 months ago
committed by GitHub
parent
commit
3f71b59b6f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs

6
aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs

@ -75,12 +75,12 @@ public class MyProfileAppService : AccountApplicationServiceBase, IMyProfileAppS
public async virtual Task<PagedResultDto<IdentitySessionDto>> GetSessionsAsync(GetMySessionsInput input)
{
var user = await GetCurrentUserAsync();
var userId = CurrentUser.GetId();
var totalCount = await IdentitySessionRepository.GetCountAsync(
user.Id, input.Device, input.ClientId);
userId, input.Device, input.ClientId);
var identitySessions = await IdentitySessionRepository.GetListAsync(
input.Sorting, input.MaxResultCount, input.SkipCount,
user.Id, input.Device, input.ClientId);
userId, input.Device, input.ClientId);
return new PagedResultDto<IdentitySessionDto>(totalCount,
identitySessions.Select(session => new IdentitySessionDto

Loading…
Cancel
Save