·优化:代码规范
This commit is contained in:
parent
53ae4ea6bc
commit
ef91551449
@ -76,6 +76,7 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
/**
|
||||
* 自定义缓存管理器 整合spring-cache
|
||||
*/
|
||||
@Override
|
||||
@Bean
|
||||
public CacheManager cacheManager() {
|
||||
return new PlusSpringCacheManager();
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user