关闭订单修改

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){ for(OrderSubPO orderSubPO : orderSubPOList){
orderSubPO.setPaymentId(paymentId); orderSubPO.setPaymentId(paymentId);
orderSubPO.setPaymentMethod(PayStatusEnum.USERPAYING.getCode());
} }
orderMainRepo.save(orderMainPO); orderMainRepo.save(orderMainPO);

View File

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