From beb292b65897cd8d6d2aef072065d858d95a5776 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 23 四月 2022 11:23:57 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/config/CoolExceptionHandler.java |    6 +++---
 1 files changed, 3 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..5d7e928 100644
--- a/src/main/java/com/zy/common/config/CoolExceptionHandler.java
+++ b/src/main/java/com/zy/common/config/CoolExceptionHandler.java
@@ -27,10 +27,10 @@
     @ExceptionHandler(CoolException.class)
     public R handleRRException(CoolException e) {
         String[] split = e.getMessage().split("-");
-        if (split.length > 2) {
-            return R.error(e.getMessage());
+        if (split.length == 2) {
+            return R.parse(e.getMessage());
         }
-        return R.parse(e.getMessage());
+        return R.error(e.getMessage());
     }
 
 }

--
Gitblit v1.9.1