From 877a696655516acaa1ee19ecbc8d050394c26c2b Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期四, 27 三月 2025 17:31:52 +0800 Subject: [PATCH] fix:新增接口 --- LifePayment/LifePayment.Application/User/AccountService.cs | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs index 7ddb6db..ac9b944 100644 --- a/LifePayment/LifePayment.Application/User/AccountService.cs +++ b/LifePayment/LifePayment.Application/User/AccountService.cs @@ -16,6 +16,7 @@ using Volo.Abp.Identity; using Volo.Abp.Identity.Application.Contracts.Account; using Volo.Abp.IdentityModel; +using Volo.Abp.Threading; using ZeroD.Util; using ZeroD.Util.Fadd; using static LifePayment.Domain.Shared.LifePaymentConstant; @@ -143,6 +144,31 @@ return result; } + public async Task<LifePayPhoneMesssageCodeLoginOutput> LifePayUserMesssageByIduser(Guid id) + { + string[] channlesNum = new string[0]; + var lifeUser = await _lifePayUserRepository.Where(x => x.Id == id).FirstOrDefaultAsync(); + CheckExtensions.IfTrueThrowUserFriendlyException(lifeUser == null, + "鐢ㄦ埛涓嶅瓨鍦�"); + var backClientUser = await _userRepository.Where(x => x.ClientId == Constant.ClientType.Back + && x.PhoneNumber == lifeUser.PhoneNumber).FirstOrDefaultAsync(); + if (backClientUser != null) + { + channlesNum = await _userChannleRep.Where(x => x.UserId == backClientUser.Id).Select(s => s.ChannleId).ToArrayAsync(); + } + + LifePayPhoneMesssageCodeLoginOutput result = new LifePayPhoneMesssageCodeLoginOutput() + { + UserId = id, + IsBackClientUser = backClientUser == null ? false : true, + ChannlesNum = channlesNum + }; + + + return result; + } + + public async Task<IdentityModelTokenCacheItem> GetTokenForWeb(AccessRequestDto accessRequestDto, string webClientIp) { IdentityClientConfiguration config = new IdentityClientConfiguration -- Gitblit v1.9.1