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