ApiNotPrintException 改为 CzgException

This commit is contained in:
2025-11-13 17:15:11 +08:00
parent d05a52f98e
commit 134a7aae85
45 changed files with 199 additions and 385 deletions

View File

@@ -45,15 +45,6 @@ public class CzgControllerAdvice {
return CzgResult.failure(CzgRespCode.NOT_LOGIN.getCode(), CzgRespCode.NOT_LOGIN + ":" + ex.getMessage());
}
@ResponseBody
@ExceptionHandler(value = ApiNotPrintException.class)
@ResponseStatus(HttpStatus.OK)
public CzgResult<Object> apiNotPrintErrorHandler(ApiNotPrintException ex) {
// setErrorLog(ex);
log.error("校验异常:{}", ex.getMessage());
return CzgResult.failure(ex.getMessage());
}
@ResponseBody
@ExceptionHandler(value = HttpMessageNotReadableException.class)
@ResponseStatus(HttpStatus.OK)
@@ -91,7 +82,8 @@ public class CzgControllerAdvice {
*/
@ExceptionHandler(CzgException.class)
public CzgResult<Object> handleCzgException(CzgException ex) {
setErrorLog(ex);
// setErrorLog(ex);
log.error("CzgException校验异常:{}", ex.getMessage());
return CzgResult.failure(ex.getCode(), ex.getMsg());
}