关闭订单修改
This commit is contained in:
@ -191,6 +191,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
|
||||
for(OrderSubPO orderSubPO : orderSubPOList){
|
||||
orderSubPO.setPaymentId(paymentId);
|
||||
orderSubPO.setPaymentMethod(PayStatusEnum.USERPAYING.getCode());
|
||||
}
|
||||
|
||||
orderMainRepo.save(orderMainPO);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user