From e35566968a190575b1662fb9f7d1246fda250888 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 19 三月 2025 09:03:17 +0800 Subject: [PATCH] fix: s --- LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 9 +++++++++ LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs | 2 ++ LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 7 ++++++- LifePayment/LifePayment.Application/LifePay/LifePayService.cs | 35 +++++++++++++++++++++-------------- 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs index 93d2726..9e3b6f9 100644 --- a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs +++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs @@ -171,6 +171,8 @@ /// <returns></returns> Task<PageOutput<CreateEditPayChannelsInput>> GetLifePayChannlesPage(PageInput input); + Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList(); + Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id); diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs index 5338c44..37a1beb 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs @@ -324,19 +324,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) @@ -1503,6 +1496,20 @@ return result; } + private IQueryable<CreateEditPayChannelsInput> GetLifePayChannlesListFilter() + { + return _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, + }); + } - #endregion -} + #endregion + } diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml index ce9d47f..82a03ca 100644 --- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml +++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml @@ -88,7 +88,7 @@ </member> <member name="M:LifePayment.HttpApi.LifePayController.AddLogger(LifePayment.Domain.Shared.LogErrorInput)"> <summary> - 鑾峰彇鐕冩皵鏀寔鍟嗘埛 + 娣诲姞鏃ュ織 </summary> <returns></returns> </member> @@ -140,6 +140,11 @@ <param name="input"></param> <returns></returns> </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesAllList"> + <summary> + 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 + </summary> + </member> <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesDto(System.Guid)"> <summary> 鑾峰彇娓犻亾璇︽儏 diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs index f32e018..a860b96 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs @@ -208,6 +208,15 @@ } /// <summary> + /// 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 + /// </summary> + [HttpGet] + public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList() + { + return await _lifePayService.GetLifePayChannlesAllList(); + } + + /// <summary> /// 鑾峰彇娓犻亾璇︽儏 /// </summary> /// <param name="id"></param> -- Gitblit v1.9.1