1.角色接口
This commit is contained in:
@@ -34,6 +34,12 @@
|
||||
<artifactId>cash-common-redis</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.czg</groupId>
|
||||
<artifactId>cash-common-sa-token</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.czg.exception;
|
||||
|
||||
import cn.dev33.satoken.exception.NotPermissionException;
|
||||
import com.czg.resp.CzgRespCode;
|
||||
import com.czg.resp.CzgResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -29,6 +30,14 @@ public class CzgControllerAdvice {
|
||||
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ExceptionHandler(value = NotPermissionException.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public CzgResult<Object> notPermissionErrorHandler(NotPermissionException ex) {
|
||||
setErrorLog(ex);
|
||||
return CzgResult.failure(CzgRespCode.UN_PERMISSION);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
Reference in New Issue
Block a user