支付方式接口调整 #63

Merged
root merged 1 commits from cxw into master 2024-10-23 11:01:59 +08:00

View File

@ -31,8 +31,15 @@ public class AppPayChannelController {
@GetMapping("/get-enable-code-list")
@Operation(summary = "获得指定应用的开启的支付渠道编码列表")
@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);
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));
}