!263 优化:代码规范

Merge pull request !263 from hzf/dev
This commit is contained in:
疯狂的狮子Li 2022-12-15 06:52:19 +00:00 committed by Gitee
commit d2b1177580
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 3 deletions

View File

@ -76,6 +76,7 @@ public class RedisConfig extends CachingConfigurerSupport {
/**
* 自定义缓存管理器 整合spring-cache
*/
@Override
@Bean
public CacheManager cacheManager() {
return new PlusSpringCacheManager();

View File

@ -54,7 +54,7 @@ public class PlusDataPermissionHandler {
/**
* 无效注解方法缓存用于快速返回
*/
private final Set<String> inavlidCacheSet = new ConcurrentHashSet<>();
private final Set<String> invalidCacheSet = new ConcurrentHashSet<>();
/**
* spel 解析器
@ -70,7 +70,7 @@ public class PlusDataPermissionHandler {
public Expression getSqlSegment(Expression where, String mappedStatementId, boolean isSelect) {
DataColumn[] dataColumns = findAnnotation(mappedStatementId);
if (ArrayUtil.isEmpty(dataColumns)) {
inavlidCacheSet.add(mappedStatementId);
invalidCacheSet.add(mappedStatementId);
return where;
}
LoginUser currentUser = DataPermissionHelper.getVariable("user");
@ -194,6 +194,6 @@ public class PlusDataPermissionHandler {
* 是否为无效方法 无数据权限
*/
public boolean isInvalid(String mappedStatementId) {
return inavlidCacheSet.contains(mappedStatementId);
return invalidCacheSet.contains(mappedStatementId);
}
}