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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
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 |
|
|
|
|