|
@@ -1591,7 +1591,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
FsStoreOrder order=null;
|
|
FsStoreOrder order=null;
|
|
if(type.equals(1)){
|
|
if(type.equals(1)){
|
|
FsStorePayment storePayment=paymentService.selectFsStorePaymentByCode(payCode);
|
|
FsStorePayment storePayment=paymentService.selectFsStorePaymentByCode(payCode);
|
|
- if(storePayment==null||!storePayment.getStatus().equals(0)){
|
|
|
|
|
|
+ if(storePayment==null){
|
|
|
|
+ throw new CustomException("当前支付记录未找到!");
|
|
|
|
+ }
|
|
|
|
+ if(!storePayment.getStatus().equals(0)){
|
|
|
|
+ logger.warn("当前支付记录不为已支付,已经跳过: paycode: {}",storePayment.getPayCode());
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
FsStorePayment storePaymentMap=new FsStorePayment();
|
|
FsStorePayment storePaymentMap=new FsStorePayment();
|
|
@@ -1609,8 +1613,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
if(order!=null&&!order.getPaid().equals(0)){
|
|
if(order!=null&&!order.getPaid().equals(0)){
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
- return "";
|
|
|
|
|
|
+ throw new CustomException("当前订单未找到! paycode:"+payCode);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(type.equals(2)){
|
|
else if(type.equals(2)){
|
|
@@ -1660,8 +1663,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
}
|
|
}
|
|
catch (Exception e){
|
|
catch (Exception e){
|
|
logger.error("payConfirm: {} ",e.getMessage(),e);
|
|
logger.error("payConfirm: {} ",e.getMessage(),e);
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
- return "";
|
|
|
|
|
|
+ throw new RuntimeException(e);
|
|
}
|
|
}
|
|
return "SUCCESS";
|
|
return "SUCCESS";
|
|
}
|
|
}
|
|
@@ -3231,13 +3233,13 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
if(ObjectUtil.isNotNull(body)){
|
|
if(ObjectUtil.isNotNull(body)){
|
|
if("80".equals(body.getStatus()) || "90".equals(body.getStatus())){
|
|
if("80".equals(body.getStatus()) || "90".equals(body.getStatus())){
|
|
// 更新订单状态和支付状态
|
|
// 更新订单状态和支付状态
|
|
- payment.setStatus(1);
|
|
|
|
- fsStorePaymentMapper.updateFsStorePayment(payment);
|
|
|
|
|
|
+// payment.setStatus(1);
|
|
|
|
+// fsStorePaymentMapper.updateFsStorePayment(payment);
|
|
orderService.payConfirm(1, order.getId(), payment.getPayCode(),
|
|
orderService.payConfirm(1, order.getId(), payment.getPayCode(),
|
|
payment.getTradeNo(),
|
|
payment.getTradeNo(),
|
|
body.getChlTrxId(),
|
|
body.getChlTrxId(),
|
|
payment.getTradeNo());
|
|
payment.getTradeNo());
|
|
- return R.error("订单已支付");
|
|
|
|
|
|
+ return R.error("订单已支付,请刷新页面");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|