二级缓存手动清理
This commit is contained in:
parent
e1fb7b0b9e
commit
f4670d45cd
|
@ -158,7 +158,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||||
public void insertWithAttrs(ResourceDTO dto) {
|
public void insertWithAttrs(ResourceDTO dto) {
|
||||||
ResourceEntity resourceEntity = new ResourceEntity();
|
ResourceEntity resourceEntity = new ResourceEntity();
|
||||||
BeanUtils.copyProperties(dto, resourceEntity);
|
BeanUtils.copyProperties(dto, resourceEntity);
|
||||||
|
@ -186,7 +186,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(allEntries = true)
|
||||||
public void deleteWithAttrs(JSONObject jsonObject) {
|
public void deleteWithAttrs(JSONObject jsonObject) {
|
||||||
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
||||||
List<Long> idList = jsonArray.toJavaList(Long.class);
|
List<Long> idList = jsonArray.toJavaList(Long.class);
|
||||||
|
@ -200,7 +200,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(allEntries = true)
|
||||||
public void updateWithAttrs(ResourceDTO dto) {
|
public void updateWithAttrs(ResourceDTO dto) {
|
||||||
ResourceEntity resourceEntity = new ResourceEntity();
|
ResourceEntity resourceEntity = new ResourceEntity();
|
||||||
BeanUtils.copyProperties(dto, resourceEntity);
|
BeanUtils.copyProperties(dto, resourceEntity);
|
||||||
|
@ -763,7 +763,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
* 同步知识库
|
* 同步知识库
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(allEntries = true)
|
||||||
public void KnowledgeBase() {
|
public void KnowledgeBase() {
|
||||||
final List<String> knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList());
|
final List<String> knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList());
|
||||||
final int pageSize = 100;
|
final int pageSize = 100;
|
||||||
|
|
Loading…
Reference in New Issue