selectTotal 缓存
This commit is contained in:
parent
fbeadb6ba3
commit
9b982cadcc
|
@ -129,6 +129,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
private static final String selectCensusApplyTableKey = "selectCensusApplyTable";
|
private static final String selectCensusApplyTableKey = "selectCensusApplyTable";
|
||||||
|
|
||||||
|
private static final String resourceSelectTotalKey = "resourceSelectTotal";
|
||||||
|
|
||||||
@Value("${system.startDay}")
|
@Value("${system.startDay}")
|
||||||
private String systemDay;
|
private String systemDay;
|
||||||
|
|
||||||
|
@ -666,6 +668,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = resourceSelectTotalKey, key = "'totle'")
|
||||||
public Object selectTotal() {
|
public Object selectTotal() {
|
||||||
HashMap<String, Object> resultMap = new HashMap<>();
|
HashMap<String, Object> resultMap = new HashMap<>();
|
||||||
List<Map> re = resourceDao.selectTypeCount(null);
|
List<Map> re = resourceDao.selectTypeCount(null);
|
||||||
|
@ -2313,7 +2316,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
x.put("deptType", ucsDept.get("type"));
|
x.put("deptType", ucsDept.get("type"));
|
||||||
x.put("district", ucsDept.get("district"));
|
x.put("district", ucsDept.get("district"));
|
||||||
x.replace("deptName", ucsDept.get("ucs_name"));
|
x.replace("deptName", ucsDept.get("ucs_name"));
|
||||||
} {
|
}
|
||||||
|
{
|
||||||
logger.error("未在ucs系统中找到浪潮{}单位对应部门", x.get("deptName").toString());
|
logger.error("未在ucs系统中找到浪潮{}单位对应部门", x.get("deptName").toString());
|
||||||
x.put("dept_id", "");
|
x.put("dept_id", "");
|
||||||
x.put("deptType", 2);
|
x.put("deptType", 2);
|
||||||
|
|
|
@ -110,4 +110,13 @@
|
||||||
diskPersistent="true"
|
diskPersistent="true"
|
||||||
memoryStoreEvictionPolicy="LRU"/>
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
<!-- selectTotal缓存 -->
|
||||||
|
<cache name="resourceSelectTotal"
|
||||||
|
maxElementsInMemory="1000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="15"
|
||||||
|
timeToLiveSeconds="60"
|
||||||
|
overflowToDisk="true"
|
||||||
|
diskPersistent="true"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
</ehcache>
|
</ehcache>
|
Loading…
Reference in New Issue