@Service public class SysDictCacheService extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private SysDictMapper |
sysDictMapper |
| 构造器和说明 |
|---|
SysDictCacheService() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearCacheAll()
清除数据字典所有缓存
|
String |
selectSysDictItemByCodeAndKey(String code,
String key)
根据字典标识和字典项值反正显示内容
|
List<SysDictItem> |
selectSysDictItemListByCode(String code)
根据字典标识查询字典项列表
|
private SysDictMapper sysDictMapper
@Cacheable(value="sys_dict",
key="#code + \'_\' + #key")
public String selectSysDictItemByCodeAndKey(String code,
String key)
code - 字典标识key - 字典项值@Cacheable(value="sys_dict",
key="#code")
public List<SysDictItem> selectSysDictItemListByCode(String code)
code - 字典标识@CacheEvict(value="sys_dict",
allEntries=true,
beforeInvocation=true)
public void clearCacheAll()
Copyright © 2020. All rights reserved.