From 24925c9d9243358a3a1c7fdcfb6eb67c867fc80f Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期三, 19 三月 2025 13:59:28 +0800 Subject: [PATCH] fix:新增用户接口加入渠道 --- LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 41 +++++++++++++++++++++++++++-------------- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 2ea55a1..f87e0a1 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -175,6 +175,8 @@ new UserListOutput() { Id = x.Id, + 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 @@ -352,19 +354,12 @@ public async Task<PageOutput<CreateEditPayChannelsInput>> GetLifePayChannlesPage(PageInput input) { + return await GetLifePayChannlesListFilter().GetPageResult(input.PageModel); + } - return await _lifePayChannlesRep.Select(x => - new CreateEditPayChannelsInput - { - Id = x.Id, - ChannlesRate = x.ChannlesRate, - ChannlesName = x.ChannlesName, - ChannlesNum = x.ChannlesNum, - Status = x.Status, - SwitchType = x.SwitchType, - ChannlesType = x.ChannlesType, - }) - .GetPageResult(input.PageModel); + public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList() + { + return await GetLifePayChannlesListFilter().Where(x => x.Status == LifePayChannelsStatsEnum.鍚敤).ToListAsync(); } public async Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id) @@ -374,6 +369,7 @@ { Id = x.Id, ChannlesRate = x.ChannlesRate, + ChannlesRakeRate = x.ChannlesRakeRate, ChannlesName = x.ChannlesName, ChannlesNum = x.ChannlesNum, Status = x.Status, @@ -389,6 +385,7 @@ { Id = x.Id, ChannlesRate = x.ChannlesRate, + ChannlesRakeRate = x.ChannlesRakeRate, ChannlesName = x.ChannlesName, ChannlesNum = x.ChannlesNum, Status = x.Status, @@ -1200,6 +1197,7 @@ dto.ChannlesName = input.ChannlesName; dto.ChannlesNum = input.ChannlesNum; dto.ChannlesRate = input.ChannlesRate; + dto.ChannlesRakeRate = input.ChannlesRakeRate; dto.SwitchType = input.SwitchType; dto.ChannlesType = input.ChannlesType; dto.Status = input.Status; @@ -1583,6 +1581,21 @@ return result; } + private IQueryable<CreateEditPayChannelsInput> GetLifePayChannlesListFilter() + { + return _lifePayChannlesRep.Select(x => + new CreateEditPayChannelsInput + { + Id = x.Id, + ChannlesRate = x.ChannlesRate, + ChannlesRakeRate = x.ChannlesRakeRate, + ChannlesName = x.ChannlesName, + ChannlesNum = x.ChannlesNum, + Status = x.Status, + SwitchType = x.SwitchType, + ChannlesType = x.ChannlesType, + }); + } - #endregion -} + #endregion + } -- Gitblit v1.9.1