|
@@ -1,7 +1,7 @@
|
|
|
package com.xjrsoft.config;
|
|
package com.xjrsoft.config;
|
|
|
|
|
|
|
|
import cn.dev33.satoken.context.SaHolder;
|
|
import cn.dev33.satoken.context.SaHolder;
|
|
|
-import cn.dev33.satoken.exception.DisableLoginException;
|
|
|
|
|
|
|
+import cn.dev33.satoken.exception.DisableServiceException;
|
|
|
import cn.dev33.satoken.exception.NotLoginException;
|
|
import cn.dev33.satoken.exception.NotLoginException;
|
|
|
import cn.dev33.satoken.exception.NotPermissionException;
|
|
import cn.dev33.satoken.exception.NotPermissionException;
|
|
|
import cn.dev33.satoken.exception.NotRoleException;
|
|
import cn.dev33.satoken.exception.NotRoleException;
|
|
@@ -91,7 +91,7 @@ public class SaTokenConfig implements WebMvcConfigurer {
|
|
|
return SaResult.get(ResponseCode.REQ_REJECT.getCode(), ResponseCode.REQ_REJECT.getMessage(), null);
|
|
return SaResult.get(ResponseCode.REQ_REJECT.getCode(), ResponseCode.REQ_REJECT.getMessage(), null);
|
|
|
} else if (e instanceof NotPermissionException) { // 如果是权限异常
|
|
} else if (e instanceof NotPermissionException) { // 如果是权限异常
|
|
|
return SaResult.get(ResponseCode.REQ_REJECT.getCode(), ResponseCode.REQ_REJECT.getMessage(), null);
|
|
return SaResult.get(ResponseCode.REQ_REJECT.getCode(), ResponseCode.REQ_REJECT.getMessage(), null);
|
|
|
- } else if (e instanceof DisableLoginException) { // 如果是被封禁异常
|
|
|
|
|
|
|
+ } else if (e instanceof DisableServiceException) { // 如果是被封禁异常
|
|
|
return SaResult.get(ResponseCode.REQ_REJECT.getCode(), ResponseCode.REQ_REJECT.getMessage(), null);
|
|
return SaResult.get(ResponseCode.REQ_REJECT.getCode(), ResponseCode.REQ_REJECT.getMessage(), null);
|
|
|
} else { // 普通异常, 输出:500 + 异常信息
|
|
} else { // 普通异常, 输出:500 + 异常信息
|
|
|
return SaResult.get(ResponseCode.INTERNAL_SERVER_ERROR.getCode(), ResponseCode.INTERNAL_SERVER_ERROR.getMessage(), null);
|
|
return SaResult.get(ResponseCode.INTERNAL_SERVER_ERROR.getCode(), ResponseCode.INTERNAL_SERVER_ERROR.getMessage(), null);
|