| 12345678910111213141516171819202122232425262728 |
- using System.Threading.Tasks;
- using Abp.Auditing;
- using WeApp.BaseSystem.Sessions.Dto;
- using WeApp.Configuration;
- namespace WeApp.BaseSystem.Sessions
- {
- public class SessionAppService : IwbAppServiceBase, ISessionAppService
- {
- [DisableAuditing]
- public async Task<GetCurrentLoginInformationsOutput> GetCurrentLoginInformations()
- {
- var output = new GetCurrentLoginInformationsOutput();
- if (AbpSession.UserId.HasValue)
- {
- output.User = ObjectMapper.Map<UserLoginInfoDto>((await GetCurrentUserAsync()));
- }
- if (AbpSession.TenantId.HasValue)
- {
- output.Tenant = ObjectMapper.Map<TenantLoginInfoDto>((await GetCurrentTenantAsync()));
- }
- return output;
- }
- }
- }
|