fix: allow h5 pay country from json config
This commit is contained in:
parent
22756c5e5b
commit
b7f70dbcb9
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user