update 优化 全局异常代码

2.X
疯狂的狮子li 2 years ago
parent 14303df5a7
commit b5c01ee9cd

@ -85,7 +85,7 @@ public class GlobalExceptionHandler {
public R<Void> handleServiceException(ServiceException e, HttpServletRequest request) {
log.error(e.getMessage(), e);
Integer code = e.getCode();
return ObjectUtil.isNotNull(code) ? R.fail(code.intValue(), e.getMessage()) : R.fail(e.getMessage());
return ObjectUtil.isNotNull(code) ? R.fail(code, e.getMessage()) : R.fail(e.getMessage());
}
/**

Loading…
Cancel
Save