·优化:代码规范

This commit is contained in:
houzhongfei 2022-12-14 18:50:48 +08:00
parent 53ae4ea6bc
commit ef91551449
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);
}
}