Commit f1a528c7 by 章家宝

feat:取消订单修改发拍单状态

1 parent 6a53ff56
......@@ -166,6 +166,12 @@ public class AuctionOrderService extends AbstractAuctionService {
returnDeposit(deposit, "订单取消,退还保证金,订单号:" + auctionOrder.getOrderCode(), auctionOrder.getAccount());
auctionOrder.setCancelReason(order.getCancelReason());
auctionOrder.resetOrderState(AuctionOrder.OrderState.CANCELED, Vehicle.VehicleState.PRICED);
AuctionVehicle auctionAndVehicle = auctionVehicleDao.findTopByAuctionAndVehicle(auctionOrder.getAuction(), auctionOrder.getVehicle());
Vehicle vehicle = auctionAndVehicle.getVehicle();
if (vehicle != null) {
vehicle.setVehicleState(Vehicle.VehicleState.PRICED);
}
vrAuditService.syncVrAuditStatus(auctionAndVehicle);
gscInvoker.pushAuction(auctionOrder);
return auctionOrder;
}
......@@ -226,6 +232,10 @@ public class AuctionOrderService extends AbstractAuctionService {
Deposit deposit = depositDao.findByAuctionVehicle_AuctionAndAuctionVehicle_VehicleAndDepositStateAndAccount(auctionOrder.getAuction(), vehicle, Deposit.DepositState.FREEZE, account);
returnDeposit(deposit, "拍卖成功,退还保证金,订单号:" + auctionOrder.getOrderCode(), account);
AuctionVehicle auctionAndVehicle = auctionVehicleDao.findTopByAuctionAndVehicle(auctionOrder.getAuction(), auctionOrder.getVehicle());
Vehicle v = auctionAndVehicle.getVehicle();
if (v != null) {
v.setVehicleState(Vehicle.VehicleState.COMPLETED);
}
vrAuditService.syncVrAuditStatus(auctionAndVehicle);
// 审批通过,创建订单快照
orderSnapshotService.createFromAuctionOrder(auctionOrder);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!