From 2f62a01f02c47ff7d8cdd48d2dcc38b34aa8ac6c Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Wed, 23 Oct 2024 10:53:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/channel/AppPayChannelController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java index 12323a7..c53d091 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java @@ -31,8 +31,15 @@ public class AppPayChannelController { @GetMapping("/get-enable-code-list") @Operation(summary = "获得指定应用的开启的支付渠道编码列表") @Parameter(name = "appId", description = "应用编号", required = true, example = "1") - public CommonResult> getEnableChannelCodeList(@RequestParam("appId") Long appId) { + public CommonResult> getEnableChannelCodeList(@RequestParam("appId") Long appId, @RequestParam(value = "hideWalletPay", defaultValue = "false") Boolean hideWalletPay) { List channels = channelService.getEnableChannelList(appId); + if (hideWalletPay) { + for (int i = channels.size() - 1; i >= 0; i--) { + if ("wallet".equals(channels.get(i).getCode())) { + channels.remove(i); + } + } + } return success(convertSet(channels, PayChannelDO::getCode)); }