From d7399b083de823860a56b68c79f8e36603fb4ea3 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期一, 31 三月 2025 13:37:19 +0800 Subject: [PATCH] fix:获取渠道分佣分页列表 --- LifePayment/LifePayment.Application/User/AccountService.cs | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs index 951403b..7ba7018 100644 --- a/LifePayment/LifePayment.Application/User/AccountService.cs +++ b/LifePayment/LifePayment.Application/User/AccountService.cs @@ -93,6 +93,28 @@ return result; } + public async Task<List<ChannelOutput>> GetUserChannel() + { + var userchannel = await _userChannleRep.Where(x => x.UserId == CurrentUser.Id) + .Select(s => new ChannelOutput() + { + Name = _lifePayChannlesRepository.Where(x => x.ChannlesNum == s.ChannleId).Select(r => r.ChannlesName).FirstOrDefault(), + ChannlesNum = s.ChannleId + }).ToListAsync(); + if (userchannel.Count() == 0) + { + userchannel = await _lifePayChannlesRepository + .Select(s => new ChannelOutput() + { + Name = s.ChannlesName, + ChannlesNum = s.ChannlesNum + }).ToListAsync(); + } + + return userchannel; + } + + #endregion #region 鎿嶄綔 @@ -322,10 +344,15 @@ return res.Id; } + + + + #endregion #endregion } + } \ No newline at end of file -- Gitblit v1.9.1