From d9f9ec16b45ed0101e6afdb2beb4878524c339f3 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 22 四月 2022 18:39:46 +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