From 4072a7775f72a186b0f4b6e48cdef40b3c2d7f5a Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 23 四月 2022 09:43:14 +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