Browse Source

feat(all): 配送明细报表

1 修改导出时校验不通过的错误提示
dev
zhaoqiaobo 2 months ago
parent
commit
4dfdb167c2
  1. 5
      blade-service/logpm-report/src/main/java/com/logpm/report/config/ReportExceptionHandler.java

5
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<Object> 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);
}
}

Loading…
Cancel
Save