支付方式接口调整

This commit is contained in:
XinWei 2024-10-23 10:53:38 +08:00
parent 1b70fdd086
commit 2f62a01f02

View File

@ -31,8 +31,15 @@ public class AppPayChannelController {
@GetMapping("/get-enable-code-list") @GetMapping("/get-enable-code-list")
@Operation(summary = "获得指定应用的开启的支付渠道编码列表") @Operation(summary = "获得指定应用的开启的支付渠道编码列表")
@Parameter(name = "appId", description = "应用编号", required = true, example = "1") @Parameter(name = "appId", description = "应用编号", required = true, example = "1")
public CommonResult<Set<String>> getEnableChannelCodeList(@RequestParam("appId") Long appId) { public CommonResult<Set<String>> getEnableChannelCodeList(@RequestParam("appId") Long appId, @RequestParam(value = "hideWalletPay", defaultValue = "false") Boolean hideWalletPay) {
List<PayChannelDO> channels = channelService.getEnableChannelList(appId); List<PayChannelDO> 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)); return success(convertSet(channels, PayChannelDO::getCode));
} }