From 7dec2c11988cd97effdc7ebf63c75420ec2d48da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Tue, 18 Jun 2024 15:32:56 +0800 Subject: [PATCH] =?UTF-8?q?optimize(ebom):=20=E4=BC=98=E5=8C=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/core/exception/BaseGlobalExceptionHandle.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nflg_project_dev/nflg-boot-base/nflg-boot-core/src/main/java/com/nflg/product/base/core/exception/BaseGlobalExceptionHandle.java b/nflg_project_dev/nflg-boot-base/nflg-boot-core/src/main/java/com/nflg/product/base/core/exception/BaseGlobalExceptionHandle.java index 838f590e..114ccd6d 100644 --- a/nflg_project_dev/nflg-boot-base/nflg-boot-core/src/main/java/com/nflg/product/base/core/exception/BaseGlobalExceptionHandle.java +++ b/nflg_project_dev/nflg-boot-base/nflg-boot-core/src/main/java/com/nflg/product/base/core/exception/BaseGlobalExceptionHandle.java @@ -124,8 +124,11 @@ public class BaseGlobalExceptionHandle { @ResponseBody public ResultVO handleRuntimeExceptionException(RuntimeException e) { log.error(e.getMessage(),e); - //throw new NflgBusinessException(STATE.Error, "系统错误,请联系管理员"); - return ResultVO.error("系统错误,请联系管理员"); + if (StrUtil.isNotBlank(e.getMessage()) && e.getMessage().contains("Deadlock")) { + return ResultVO.error("操作失败,请重试"); + } else { + return ResultVO.error("系统错误,请联系管理员"); + } } @ExceptionHandler(value = BadSqlGrammarException.class)