新增设备异常
This commit is contained in:
parent
68ce3e9b15
commit
4592be4760
@ -48,7 +48,9 @@ public class ResponseAdvice {
|
||||
result.setCode(ErrorResultCodeEnum.PARAMS_ERROR.getValue());
|
||||
} else if (e instanceof FileException) {
|
||||
result.setCode(ErrorResultCodeEnum.FILE_ERROR.getValue());
|
||||
} else if(e instanceof AccessTokenException) {
|
||||
} else if (e instanceof AppDeviceException) {
|
||||
result.setCode(ErrorResultCodeEnum.DEVICE_ERROR.getValue());
|
||||
} else if (e instanceof AccessTokenException) {
|
||||
response.setStatus(HttpStatus.UNAUTHORIZED.value());
|
||||
}
|
||||
// 自定义提示信息
|
||||
|
@ -54,6 +54,8 @@ public class TransactionConfig {
|
||||
source.addTransactionalMethod("exec*", required);
|
||||
source.addTransactionalMethod("set*", required);
|
||||
|
||||
source.addTransactionalMethod("login", required);
|
||||
|
||||
source.addTransactionalMethod("get*", readOnly);
|
||||
source.addTransactionalMethod("query*", readOnly);
|
||||
source.addTransactionalMethod("find*", readOnly);
|
||||
|
@ -25,7 +25,8 @@ public enum ErrorResultCodeEnum {
|
||||
TOKEN_ERROR(40302),
|
||||
USERNAME_PASSWORD_ERROR(40303),
|
||||
USER_EXIST(40304),
|
||||
PERMISSION_ERROR(40401);
|
||||
PERMISSION_ERROR(40401),
|
||||
DEVICE_ERROR(40501);
|
||||
|
||||
private int value;
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.cm.common.exception;
|
||||
|
||||
import com.cm.common.exception.base.SystemException;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: AppDeviceException
|
||||
* @Description: APP设备异常
|
||||
* @Author: WangGeng
|
||||
* @Date: 2019/8/27 11:14 上午
|
||||
* @Version: 1.0
|
||||
**/
|
||||
public class AppDeviceException extends SystemException {
|
||||
|
||||
public AppDeviceException() {
|
||||
}
|
||||
|
||||
public AppDeviceException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public AppDeviceException(String message, boolean withMsg) {
|
||||
super(message, withMsg);
|
||||
}
|
||||
|
||||
public AppDeviceException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public AppDeviceException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user