From 2c0e0e608a26167898e54301671a6cbe59db67fb Mon Sep 17 00:00:00 2001 From: ajaxfan <909938737@qq.com> Date: Thu, 25 Mar 2021 19:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=BC=82=E5=B8=B8=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/BusinessExceptionHandlerAdvicePro.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/uboot-common/src/main/java/com/chinaunicom/mall/ebtp/common/exception/service/BusinessExceptionHandlerAdvicePro.java b/uboot-common/src/main/java/com/chinaunicom/mall/ebtp/common/exception/service/BusinessExceptionHandlerAdvicePro.java index b62e246..c725c4e 100644 --- a/uboot-common/src/main/java/com/chinaunicom/mall/ebtp/common/exception/service/BusinessExceptionHandlerAdvicePro.java +++ b/uboot-common/src/main/java/com/chinaunicom/mall/ebtp/common/exception/service/BusinessExceptionHandlerAdvicePro.java @@ -96,7 +96,7 @@ public class BusinessExceptionHandlerAdvicePro { Map body = new HashMap<>(); body.put("errors", JsonUtils.objectToJson(invalidArguments)); body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - + return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "参数验证错误", Convert.toStr(body)); } @@ -160,7 +160,7 @@ public class BusinessExceptionHandlerAdvicePro { body.put("errors", exception.getMessage()); body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "参数缺失" + exception.getMessage(), Convert.toStr(body)); + return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "参数缺失", Convert.toStr(body)); } // ----------------------------data-------------------------------------- @@ -180,7 +180,7 @@ public class BusinessExceptionHandlerAdvicePro { body.put("errors", exception.getMessage()); body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "数据库异常" + exception.getMessage(), Convert.toStr(body)); + return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "数据库异常", Convert.toStr(body)); } /** @@ -252,8 +252,7 @@ public class BusinessExceptionHandlerAdvicePro { body.put("errors", exception.getMessage()); body.put("error", HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase()); - return BaseResponse.fail(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统异常" + exception.getMessage(), - Convert.toStr(body)); + return BaseResponse.fail(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统异常", Convert.toStr(body)); } @ExceptionHandler({ TransactionSystemException.class })