fix: allow h5 pay country from json config

This commit is contained in:
zhx 2026-06-24 12:14:43 +08:00
parent 22756c5e5b
commit b7f70dbcb9

View File

@ -117,11 +117,8 @@ public class PayWebH5OptionsQryExe {
private PayCountry resolvePayCountry(PayWebH5OptionsCmd cmd) {
if (Objects.nonNull(cmd.getPayCountryId())) {
// H5 后续下单要使用同一个 payCountryId显式传 id 时只校验后台是否仍存在且上架
PayCountry payCountry = payCountryService.getById(cmd.getPayCountryId());
return Objects.nonNull(payCountry) && Boolean.TRUE.equals(payCountry.getShelf())
? payCountry
: null;
// H5 展示权限由前端 JSON 控制线上 sys_pay_country 当前没有维护上架位这里只确认 id 仍存在
return payCountryService.getById(cmd.getPayCountryId());
}
if (StringUtils.isNotBlank(cmd.getCountryCode())) {
@ -132,7 +129,6 @@ public class PayWebH5OptionsQryExe {
ResponseAssert.notNull(CommonErrorCode.NOT_FOUND_RECORD_INFO, country);
return payCountryService.query()
.eq(PayCountry::getCountryId, country.getId())
.eq(PayCountry::getShelf, Boolean.TRUE)
.orderByDesc(PayCountry::getSort)
.last(PageConstant.LIMIT_ONE)
.getOne();