From 1ca7f2ec78ebe197dca8671049d21ab21bd90f23 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期三, 19 三月 2025 13:48:48 +0800
Subject: [PATCH] fix:用户管理接口新增渠道

---
 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs |    4 ++--
 LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs                  |    4 ++--
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs          |    5 ++---
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
index 38e0d09..853c9a4 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -127,12 +127,12 @@
     /// <summary>
     /// 鏈�鍚庣櫥褰曟笭閬�
     /// </summary>
-    public string CreationChannle { get; set; }
+    public string? CreationChannle { get; set; }
 
     /// <summary>
     /// 鏈�鍚庣櫥褰曟笭閬�
     /// </summary>
-    public string LastLoginChannle { get; set; }
+    public string? LastLoginChannle { get; set; }
 
     public DateTime? LastLoginTime { get; set; }
 
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index df3cda1..f87e0a1 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -171,13 +171,12 @@
     /// <returns></returns>
     public async Task<PageOutput<UserListOutput>> GetUserPage(PageInput input)
     {
-        var channel = await _lifePayChannlesRep.ToListAsync();
         return await _lifePayUserRepository.Select(x =>
                                                    new UserListOutput()
                                                    {
                                                        Id = x.Id,
-                                                       //CreationChannle = string.IsNullOrEmpty(x.CreationChannleNum) ? "" : channel.Where(c => c.ChannlesNum == x.CreationChannleNum).FirstOrDefault().ChannlesName,
-                                                       //LastLoginChannle = string.IsNullOrEmpty(x.LastLoginChannleNum) ? "" : channel.Where(c => c.ChannlesNum == x.LastLoginChannleNum).FirstOrDefault().ChannlesName,
+                                                       CreationChannle = string.IsNullOrEmpty(x.CreationChannleNum) ? "" : _lifePayChannlesRep.Where(c => c.ChannlesNum == x.CreationChannleNum).FirstOrDefault().ChannlesName,
+                                                       LastLoginChannle = string.IsNullOrEmpty(x.LastLoginChannleNum) ? "" : _lifePayChannlesRep.Where(c => c.ChannlesNum == x.LastLoginChannleNum).FirstOrDefault().ChannlesName,
                                                        PhoneNumber = x.PhoneNumber,
                                                        CreationTime = x.CreationTime,
                                                        LastLoginTime = x.LastLoginTime
diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs
index e326820..5540d1f 100644
--- a/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs
+++ b/LifePayment/LifePayment.Domain/LifePay/LifePayUser.cs
@@ -23,7 +23,7 @@
         /// <summary>
         /// 娉ㄥ唽娓犻亾缂栧彿
         /// </summary>
-        public string CreationChannleNum { get; set; }
+        public string? CreationChannleNum { get; set; }
 
         public string UnionId { get; set; }
 
@@ -32,6 +32,6 @@
         /// <summary>
         /// 鏈�鍚庣櫥褰曟笭閬撶紪鍙�
         /// </summary>
-        public string LastLoginChannleNum { get; set; }
+        public string? LastLoginChannleNum { get; set; }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1