From 4dfdb167c2900169316d4628ce01a9ae25373fdf Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Thu, 14 Nov 2024 17:10:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E9=85=8D=E9=80=81=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改导出时校验不通过的错误提示 --- .../java/com/logpm/report/config/ReportExceptionHandler.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java b/blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java index 68cc90e57..e5fb61e08 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java @@ -1,6 +1,5 @@ package com.logpm.report.config; -import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tenant.exception.TenantDataSourceException; import org.springblade.core.tool.api.R; @@ -23,9 +22,7 @@ public class ReportExceptionHandler { @ResponseStatus(HttpStatus.BAD_REQUEST) public ResponseEntity handleCustomException(TenantDataSourceException e) { String errorMessage = e.getMessage(); - JSONObject js = new JSONObject(); - js.put("msg",errorMessage); - return new ResponseEntity<>(R.data(ResultCode.FAILURE.getCode(),js,errorMessage), HttpStatus.BAD_REQUEST); + return new ResponseEntity<>(R.fail(ResultCode.FAILURE.getCode(),errorMessage), HttpStatus.BAD_REQUEST); } }