|
@@ -91,8 +91,8 @@ public class ExceptionAdvice {
|
|
|
@ExceptionHandler(value = BusinessException.class)
|
|
|
public BaseResponse exception(HttpServletRequest request, BusinessException exception) {
|
|
|
logger.error("业务异常", exception);
|
|
|
-
|
|
|
- return BaseResponse.createFail(null,exception.getCode(),exception.getMessage());
|
|
|
+ Integer code = exception.getCode()==null?ErrorCodeEnum.BUSINESS_OPT_ERROR.getCode():exception.getCode();
|
|
|
+ return BaseResponse.createFail(null,code,exception.getMessage());
|
|
|
}
|
|
|
|
|
|
|