|
@@ -280,11 +280,14 @@ public class OpenApiOrderServiceImpl implements OpenApiOrderService {
|
|
|
cancelOrder(order, cancelReq.getCancelReason(), orderStatus);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
} catch (Exception e) {
|
|
|
count += 1;
|
|
|
// 回滚事务
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ } finally {
|
|
|
+ Order newOrder = iOrderService.getById(order.getId());
|
|
|
+ newOrder.setCancelType(cancelReq.getCancelType());
|
|
|
+ iOrderService.updateById(newOrder);
|
|
|
}
|
|
|
|
|
|
if (count > 0 || responseResult.getCode() == ResponseResultCodeEnum.FAIL.getCode()) {
|
|
@@ -337,9 +340,7 @@ public class OpenApiOrderServiceImpl implements OpenApiOrderService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Order newOrder = iOrderService.getById(order.getId());
|
|
|
- newOrder.setCancelType(cancelType);
|
|
|
- iOrderService.updateById(newOrder);
|
|
|
+
|
|
|
return responseResult;
|
|
|
}
|
|
|
|