提交 f1e5686c authored 作者: 000516's avatar 000516 提交者: Coding

添加数据异常类

添加数据异常类
package com.wangxiaolu.promotion.result.advice;
import com.wangxiaolu.promotion.exception.APIException;
import com.wangxiaolu.promotion.exception.DataException;
import com.wangxiaolu.promotion.exception.FlowException;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.result.basedata.RCode;
......@@ -37,6 +38,11 @@ public class ControllerExceptionAdvice {
return new R(e.getCode(), e.getMsg(), e.getMessage());
}
@ExceptionHandler({DataException.class})
public R dataExceptionHandler(DataException e) {
return new R(e.getCode(), e.getMsg(), e.getMessage());
}
@ExceptionHandler({SQLIntegrityConstraintViolationException.class})
public R dbConstraintViolationExceptionHandler(SQLIntegrityConstraintViolationException e) {
RCode errorCode = RCode.USER_PHONE_IDENNUMBER_WXOPENID_UNIQUE_ERROR;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论