diff options
| author | zhangshuai <[email protected]> | 2022-08-05 09:19:49 +0800 |
|---|---|---|
| committer | zhangshuai <[email protected]> | 2022-08-05 09:19:49 +0800 |
| commit | bc19e8dfc1674eb0b497b37b132df6bf826681d1 (patch) | |
| tree | 31b46f4820b06f9bd7c69f13f4ef375a4ef3f374 | |
| parent | bc12c2d3cf946042f8e5d790a2ab5644cdbf08ce (diff) | |
fix: NEZ-2094 修复中文下提示异常rel-22.07.07
| -rw-r--r-- | nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java b/nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java index 915766dc..46880d09 100644 --- a/nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java +++ b/nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java @@ -68,7 +68,8 @@ public class NZExceptionHandler { @ResponseStatus(value=HttpStatus.BAD_REQUEST) public R handleDuplicateKeyException(DuplicateKeyException e, HttpServletRequest request){ logger.error(e,"Request uri: {}", request.getRequestURI()); - return R.error(RCode.SYS_DB_DUPLICATERECORD); + String msg = sysI18nService.queryValueByName(RCode.SYS_DB_DUPLICATERECORD.getCode().toString()); + return R.error(RCode.SYS_DB_DUPLICATERECORD.getCode(), msg); } @ExceptionHandler(AuthorizationException.class) |
