From 32099d29dca4874ed255a51206be7a46b7a2fe4c Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期二, 20 五月 2025 11:35:57 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/config/CoolExceptionHandler.java | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/common/config/CoolExceptionHandler.java b/src/main/java/com/zy/common/config/CoolExceptionHandler.java index 851ab72..1e2b6e2 100644 --- a/src/main/java/com/zy/common/config/CoolExceptionHandler.java +++ b/src/main/java/com/zy/common/config/CoolExceptionHandler.java @@ -26,11 +26,14 @@ @ExceptionHandler(CoolException.class) public R handleRRException(CoolException e) { + e.printStackTrace(); String[] split = e.getMessage().split("-"); - if (split.length > 2) { - return R.error(e.getMessage()); + if (split.length == 2) { + if (String.valueOf(split[0]).length() < 3) { + return R.parse(e.getMessage()); + } } - return R.parse(e.getMessage()); + return R.error(e.getMessage()); } } -- Gitblit v1.9.1