fix: 错误码情况判断
This commit is contained in:
parent
e7d63eed46
commit
be9abe64be
|
|
@ -1,6 +1,7 @@
|
|||
package cn.ysk.cashier.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.ysk.cashier.dto.ScanPayDTO;
|
||||
|
|
@ -139,6 +140,10 @@ public class TbPayServiceImpl implements TbPayService {
|
|||
String qpay;
|
||||
String payTypeCode = code.substring(0, 2);// 判断收款码
|
||||
|
||||
if (!NumberUtil.isNumber(payTypeCode)) {
|
||||
throw new BadRequestException("错误码");
|
||||
}
|
||||
|
||||
if(Integer.parseInt(payTypeCode) >=25 && Integer.parseInt(payTypeCode) <= 30){
|
||||
payType = "aliPay";
|
||||
payName = "支付宝支付";
|
||||
|
|
|
|||
Loading…
Reference in New Issue