diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index d9e6e957..9104e9f2 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -19,6 +19,8 @@ import java.util.Map; */ @Mapper public interface ResourceDao extends BaseDao { + static final String selectCensusResourceTableKey = "selectCensusResourceTable"; + static final String selectCensusApplyTableKey = "selectCensusApplyTable"; Integer deleteByIds(@Param("ids") List idList); @@ -193,8 +195,10 @@ public interface ResourceDao extends BaseDao { List> selectDeptDetailTypeCountList(Map params); + @Cacheable(value = selectCensusResourceTableKey, key = "#p0") List selectCensusResourceTable(Map params); + @Cacheable(value = selectCensusApplyTableKey, key = "#p0") List selectCensusApplyTable(Map params); List selectCollectList(@Param("resourceType") String resourceType, @Param("attrType") String attrType); diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index c580cc82..7bd4d162 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -106,6 +106,10 @@ public class ResourceServiceImpl extends CrudServiceImpl idList = jsonArray.toJavaList(Long.class); @@ -371,7 +375,7 @@ public class ResourceServiceImpl extends CrudServiceImpl 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 = CPU_NUM * 10; diff --git a/renren-admin/src/main/resources/ehcache.xml b/renren-admin/src/main/resources/ehcache.xml index c9379564..89011744 100644 --- a/renren-admin/src/main/resources/ehcache.xml +++ b/renren-admin/src/main/resources/ehcache.xml @@ -80,4 +80,24 @@ diskPersistent="true" memoryStoreEvictionPolicy="LRU"/> + + + + + + \ No newline at end of file