收银台参数问题优化,如果不匹配直接跳过。
This commit is contained in:
parent
da1863850a
commit
b30a55eafa
@ -145,6 +145,10 @@ public class CashierSupport {
|
|||||||
public CashierParam cashierParam(PayParam payParam) {
|
public CashierParam cashierParam(PayParam payParam) {
|
||||||
for (CashierExecute paramInterface : cashierExecuteList) {
|
for (CashierExecute paramInterface : cashierExecuteList) {
|
||||||
CashierParam cashierParam = paramInterface.getPaymentParams(payParam);
|
CashierParam cashierParam = paramInterface.getPaymentParams(payParam);
|
||||||
|
//如果为空,则表示收银台参数初始化不匹配,继续匹配下一条
|
||||||
|
if (cashierParam == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//如果订单不需要付款,则抛出异常,直接返回
|
//如果订单不需要付款,则抛出异常,直接返回
|
||||||
if (cashierParam.getPrice() <= 0) {
|
if (cashierParam.getPrice() <= 0) {
|
||||||
throw new ServiceException(ResultCode.PAY_UN_WANTED);
|
throw new ServiceException(ResultCode.PAY_UN_WANTED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user