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