Merge pull request '支付方式接口调整' (#63) from cxw into master
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #63
This commit is contained in:
root 2024-10-23 11:01:58 +08:00
commit 505aa43c36

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));
} }