关闭订单修改
This commit is contained in:
@ -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);
|
||||||
|
|||||||
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user