关闭订单修改

This commit is contained in:
2025-08-23 01:17:15 +08:00
parent 7ebe482e69
commit 95a0b51627
2 changed files with 5 additions and 5 deletions

View File

@ -191,6 +191,7 @@ public class OrderServiceImpl implements OrderService {
for(OrderSubPO orderSubPO : orderSubPOList){
orderSubPO.setPaymentId(paymentId);
orderSubPO.setPaymentMethod(PayStatusEnum.USERPAYING.getCode());
}
orderMainRepo.save(orderMainPO);

View File

@ -118,12 +118,12 @@ public class PayInteg {
try {
Map<String, String> result = payFacade.closeOrder(companyId, outTradeNo);
if(Objects.isNull(result)){
return true;
throw new InnerException("关闭订单失败");
} else {
String returnCode = result.get("return_code");
if(StringUtils.equalsIgnoreCase(returnCode, "FAIL")){
throw new InnerException("关闭订单失败");
}else if(Objects.nonNull(result.get("code"))){
if(StringUtils.isNotBlank(returnCode)&&StringUtils.equalsIgnoreCase(returnCode, "SUCCESS")){
return true;
} else {
throw new InnerException("关闭订单失败");
}
}
@ -132,6 +132,5 @@ public class PayInteg {
log.error("关闭订单失败",e);
throw new InnerException("关闭订单失败");
}
return false;
}
}