From 224b7d3f025d871b97884556d9fc3461b460b028 Mon Sep 17 00:00:00 2001 From: aplicity <1634594707@qq.com> Date: Tue, 9 Jun 2026 02:43:55 +0800 Subject: [PATCH] fix(ci): guard exception resolve lookup --- .../com/fsd/admin/controller/AdminDispatchController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/back/fsd-admin-api/src/main/java/com/fsd/admin/controller/AdminDispatchController.java b/back/fsd-admin-api/src/main/java/com/fsd/admin/controller/AdminDispatchController.java index 681a73a..3cd4b63 100644 --- a/back/fsd-admin-api/src/main/java/com/fsd/admin/controller/AdminDispatchController.java +++ b/back/fsd-admin-api/src/main/java/com/fsd/admin/controller/AdminDispatchController.java @@ -390,10 +390,13 @@ public ApiResponse resolveException(@PathVariable Long exceptionId, HttpServletRequest httpRequest) { AdminAuthSupport.requireAuth(httpRequest); DispatchExceptionRecordEntity exception = dispatchExceptionService.getException(exceptionId); - if ("RESOLVED".equals(exception.getExceptionStatus())) { + if (exception != null && "RESOLVED".equals(exception.getExceptionStatus())) { throw new BusinessException("DISPATCH_EXCEPTION_ALREADY_RESOLVED", "Dispatch exception already resolved"); } if ("REASSIGN".equals(request.getAction())) { + if (exception == null) { + throw new BusinessException("DISPATCH_EXCEPTION_NOT_FOUND", "Dispatch exception not found"); + } if (request.getVehicleId() == null) { throw new BusinessException("DISPATCH_EXCEPTION_VEHICLE_REQUIRED", "Reassign action requires vehicleId"); }