From 7ec7f65993e6e2ee465aee7c063ccef96c3cbf91 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 31 三月 2025 17:33:35 +0800
Subject: [PATCH] Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-lifepay-v1.3

---
 LifePayment/LifePayment.Application/User/AccountService.cs |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs
index 1e32b00..d65d9fa 100644
--- a/LifePayment/LifePayment.Application/User/AccountService.cs
+++ b/LifePayment/LifePayment.Application/User/AccountService.cs
@@ -189,12 +189,13 @@
              && x.PhoneNumber == phoneNumber).FirstOrDefaultAsync();
             if (backClientUser != null)
             {
-                channlesNum = await _userChannleRep.Where(x => x.UserId == backClientUser.Id)
-                    .Select(s => new ChannelOutput()
-                    {
-                        Name = _lifePayChannlesRepository.Where(x => x.ChannlesNum == s.ChannleId).Select(r => r.ChannlesName).FirstOrDefault(),
-                        ChannlesNum = s.ChannleId
-                    }).ToListAsync();
+                var channlesNums = await _userChannleRep.Where(x => x.UserId == backClientUser.Id).Select(s => s.ChannleId).Distinct().ToListAsync();
+                channlesNum = await _lifePayChannlesRepository.Where(x => channlesNums.Contains(x.ChannlesNum)).Select(s => new ChannelOutput()
+                {
+                    Name = s.ChannlesName,
+                    ChannlesId = s.Id,
+                    ChannlesNum = s.ChannlesNum
+                }).ToListAsync();
             }
 
             LifePayPhoneMesssageCodeLoginOutput result = new LifePayPhoneMesssageCodeLoginOutput()

--
Gitblit v1.9.1