From d864bab0b2104b35e8424084d6174efbc5538f32 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 15 一月 2025 16:28:08 +0800
Subject: [PATCH] 视频考核:优云的数据筛选出视频设备、资产管理、取消海康在线工单

---
 ycl-server/src/main/java/com/ycl/handler/GlobalExceptionHandler.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ycl-server/src/main/java/com/ycl/handler/GlobalExceptionHandler.java b/ycl-server/src/main/java/com/ycl/handler/GlobalExceptionHandler.java
index bcaade1..1002ff5 100644
--- a/ycl-server/src/main/java/com/ycl/handler/GlobalExceptionHandler.java
+++ b/ycl-server/src/main/java/com/ycl/handler/GlobalExceptionHandler.java
@@ -6,6 +6,7 @@
 import com.ycl.utils.StringUtils;
 import constant.HttpStatus;
 import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.UnexpectedTypeException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.access.AccessDeniedException;
@@ -102,7 +103,16 @@
         String message = e.getBindingResult().getFieldError().getDefaultMessage();
         return AjaxResult.error(message);
     }
-
+    /**
+     * 鍙傛暟鏍¢獙寮傚父
+     */
+    @ExceptionHandler(UnexpectedTypeException.class)
+    public AjaxResult handleUnexpectedTypeException(UnexpectedTypeException e)
+    {
+        log.error(e.getMessage(), e);
+        String message = e.getMessage();
+        return AjaxResult.error(message);
+    }
     /**
      * 婕旂ず妯″紡寮傚父
      */

--
Gitblit v1.8.0