From 32085e4e85ab782d16911c5e7d495301a61b1d8d Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 12 Jul 2025 18:15:47 +0800 Subject: [PATCH] feat(identity): optimize identity session query - Replace the SQL query with the current user Id --- .../LINGYUN/Abp/Account/MyProfileAppService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs index cf6500bd8..8194b5edd 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs +++ b/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> 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(totalCount, identitySessions.Select(session => new IdentitySessionDto