|
|
@@ -131,6 +131,10 @@ public class CancelHandler extends AbstractWaybillOrderHandler<WaybillOrderCance
|
|
|
if (gatekeeperWaybillOrder == null) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.GATEKEEPER_ORDER_NOT_FOUND, "门卫订单不存在!");
|
|
|
}
|
|
|
+ if (!GatekeeperStatusEnum.PENDING_ENTRY.getCode().equals(gatekeeperWaybillOrder.getStatus())) {
|
|
|
+ throw new BusinessPlatfromException(ErrorCodeEnum.GATEKEEPER_ORDER_STATUS_ERROR, "门卫状态异常,不能取消订单!");
|
|
|
+ }
|
|
|
+
|
|
|
gatekeeperWaybillOrder.setStatus(GatekeeperStatusEnum.CANCEL.getCode());
|
|
|
gatekeeperWaybillOrderRepository.updateById(gatekeeperWaybillOrder);
|
|
|
}
|