mirror of https://gitee.com/stylefeng/roses
【8.0】【system】【org】更新组织机构是否包含下级的缓存类
parent
94a5613844
commit
ce4d93256a
|
@ -67,4 +67,9 @@ public interface SysConstants {
|
|||
*/
|
||||
String ADMIN_USER_ACCOUNT = "admin";
|
||||
|
||||
/**
|
||||
* 缓存前缀:组织机构是否包含下级的标识
|
||||
*/
|
||||
String SYS_ORG_SUB_FLAG_CACHE_PREFIX = "SYS:ORG:HAVE_SUB_FLAG:";
|
||||
|
||||
}
|
||||
|
|
|
@ -77,6 +77,20 @@
|
|||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--内存或者redis的缓存-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>cache-sdk-memory</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>cache-sdk-redis</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package cn.stylefeng.roses.kernel.sys.modular.org.cache;
|
||||
|
||||
import cn.hutool.cache.impl.TimedCache;
|
||||
import cn.stylefeng.roses.kernel.cache.memory.AbstractMemoryCacheOperator;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.SysConstants;
|
||||
|
||||
/**
|
||||
* 组织机构是否包含下级的缓存
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/7/14 1:06
|
||||
*/
|
||||
public class SysOrgSubFlagMemoryCache extends AbstractMemoryCacheOperator<Boolean> {
|
||||
|
||||
public SysOrgSubFlagMemoryCache(TimedCache<String, Boolean> timedCache) {
|
||||
super(timedCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommonKeyPrefix() {
|
||||
return SysConstants.SYS_ORG_SUB_FLAG_CACHE_PREFIX;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package cn.stylefeng.roses.kernel.sys.modular.org.cache;
|
||||
|
||||
import cn.stylefeng.roses.kernel.cache.redis.AbstractRedisCacheOperator;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.SysConstants;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
|
||||
/**
|
||||
* 组织机构是否包含下级的缓存
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/7/14 1:06
|
||||
*/
|
||||
public class SysOrgSubFlagRedisCache extends AbstractRedisCacheOperator<Boolean> {
|
||||
|
||||
public SysOrgSubFlagRedisCache(RedisTemplate<String, Boolean> redisTemplate) {
|
||||
super(redisTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommonKeyPrefix() {
|
||||
return SysConstants.SYS_ORG_SUB_FLAG_CACHE_PREFIX;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue