|
|
|
@@ -197,18 +197,20 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
}else if (EnumPayStatus.PAY_STATUS_NOTPAY.getCode()==wxpaystatus || EnumPayStatus.PAY_STATUS_FAIL.getCode()==wxpaystatus) { |
|
|
|
//支付调用,支付遇到问题,可以重复支付 |
|
|
|
if (repeatPay) { |
|
|
|
oldRecord.setPayOrderStatus(EnumPayStatus.PAY_STATUS_WAIT.getCode()); |
|
|
|
Long payno = idworker.nextId(); |
|
|
|
if (null == payno || payno.longValue() <=0) { |
|
|
|
throw new MallinkException(ErrorCode.PAY_ORDER_PAYING.getCode(),"订单支付流水号生成失败!handleWxOrderQuery:oldRecord:"+oldRecord+":wxstatus:"+wxpaystatus); |
|
|
|
} |
|
|
|
oldRecord.setPayOrderNo(String.valueOf(payno)); |
|
|
|
|
|
|
|
int sqlRow0 =wxPayOrderMapper.updateById(oldRecord); |
|
|
|
if (sqlRow0 != 1) { |
|
|
|
logger.error("pay order update error: " + oldRecord.toString()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL); |
|
|
|
} |
|
|
|
if (oldRecord.getPayOrderStatus()!=EnumPayStatus.PAY_STATUS_WAIT.getCode()) { |
|
|
|
oldRecord.setPayOrderStatus(EnumPayStatus.PAY_STATUS_WAIT.getCode()); |
|
|
|
Long payno = idworker.nextId(); |
|
|
|
if (null == payno || payno.longValue() <=0) { |
|
|
|
throw new MallinkException(ErrorCode.PAY_ORDER_PAYING.getCode(),"订单支付流水号生成失败!handleWxOrderQuery:oldRecord:"+oldRecord+":wxstatus:"+wxpaystatus); |
|
|
|
} |
|
|
|
oldRecord.setPayOrderNo(String.valueOf(payno)); |
|
|
|
|
|
|
|
int sqlRow0 =wxPayOrderMapper.updateById(oldRecord); |
|
|
|
if (sqlRow0 != 1) { |
|
|
|
logger.error("pay order update error: " + oldRecord.toString()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return oldRecord; |
|
|
|
} |
|
|
|
|