Skip to content

Commit 32085e4

Browse files
committed
feat(identity): optimize identity session query
- Replace the SQL query with the current user Id
1 parent e7152d1 commit 32085e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public async virtual Task<IRemoteStreamContent> GetPictureAsync()
7575

7676
public async virtual Task<PagedResultDto<IdentitySessionDto>> GetSessionsAsync(GetMySessionsInput input)
7777
{
78-
var user = await GetCurrentUserAsync();
78+
var userId = CurrentUser.GetId();
7979
var totalCount = await IdentitySessionRepository.GetCountAsync(
80-
user.Id, input.Device, input.ClientId);
80+
userId, input.Device, input.ClientId);
8181
var identitySessions = await IdentitySessionRepository.GetListAsync(
8282
input.Sorting, input.MaxResultCount, input.SkipCount,
83-
user.Id, input.Device, input.ClientId);
83+
userId, input.Device, input.ClientId);
8484

8585
return new PagedResultDto<IdentitySessionDto>(totalCount,
8686
identitySessions.Select(session => new IdentitySessionDto

0 commit comments

Comments
 (0)