处理异常添加

This commit is contained in:
attiya 2025-12-23 16:34:18 +08:00
parent 6d1c78d2e0
commit da216a9d6e

View File

@ -164,6 +164,10 @@ public class SafeOrderExpirationListener {
.where(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.PROCESSED))
.where(EBIKE_BIKE_ORDER.DISPATCH_STATE.eq(OrderDispatchState.PROCESSED));
EbikeBikeOrder bikeOrder = orderService.getOne(query);
if (bikeOrder == null) {
log.error("处理工单业务异常,不存在满足处理条件的工单: orderId={}", orderId);
return;
}
bikeOrder.setDispatchState(OrderDispatchState.INEFFECTIVE);
orderService.updateById(bikeOrder);
} catch (Exception e) {