Commit 32c1c909 authored by 吴霞's avatar 吴霞

缓存和修改sql

parent 50827879
......@@ -194,6 +194,11 @@ public class DataPlatController {
return ResponseUtil.error(e.toString(), "获取医院相关统计(申请数、认证数、开展筛查数)失败!");
}
}
@GetMapping("/name")
public Object getnamelist() {
return dataPlatService.getnamDtos();
}
}
package com.sict.data.dto;
import lombok.Data;
@Data
public class NameDTO {
private Integer id;
private String name;
}
......@@ -79,4 +79,7 @@ public interface DataPlatMapper extends BaseMapper<DataPlat> {
* @return com.sict.data.dto.HospStatisticsDTO
*/
HospStatisticsDTO getHospStatistics();
List<NameDTO> getNameDTOs();
}
......@@ -83,4 +83,6 @@ public interface IDataPlatService extends IService<DataPlat> {
* @return com.sict.data.dto.HospStatisticsDTO
*/
HospStatisticsDTO getHospStatistics();
List<NameDTO> getnamDtos();
}
......@@ -224,4 +224,11 @@ public class DataPlatServiceImpl extends ServiceImpl<DataPlatMapper, DataPlat> i
}
}
@Cacheable(cacheNames = {"getnamDtos"})
@Override
public List<NameDTO> getnamDtos() {
// TODO Auto-generated method stub
return dataPlatMapper.getNameDTOs();
}
}
......@@ -2,20 +2,13 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false">
<defaultCache
eternal="false"
maxElementsInMemory="10000"
overflowToDisk="false"
timeToIdleSeconds="300"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getScreeningRank"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
......@@ -23,10 +16,10 @@
<cache
name="getScreeningRankEn"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
......@@ -34,73 +27,82 @@
<cache
name="getSerumStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getGastroscopyStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getScreeningStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getGastroscopyDetailResultStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getRiskAssessStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getGastroscopyDetailStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getHospStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getComplexStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getnamDtos"
eternal="false"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="6"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
</ehcache>
\ No newline at end of file
#Generated by Maven Integration for Eclipse
#Tue Nov 26 13:15:55 CST 2019
#Fri Nov 29 10:02:44 CST 2019
version=1.0-SNAPSHOT
groupId=dataplat
m2e.projectName=data-plat
......
......@@ -2,20 +2,13 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false">
<defaultCache
eternal="false"
maxElementsInMemory="10000"
overflowToDisk="false"
timeToIdleSeconds="300"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getScreeningRank"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
......@@ -23,10 +16,10 @@
<cache
name="getScreeningRankEn"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
......@@ -34,73 +27,82 @@
<cache
name="getSerumStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getGastroscopyStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getScreeningStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getGastroscopyDetailResultStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getRiskAssessStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getGastroscopyDetailStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getHospStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getComplexStatistics"
eternal="false"
maxElementsInMemory="10000"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache
name="getnamDtos"
eternal="false"
maxElementsInMemory="100000"
overflowToDisk="false"
diskPersistent="false"
timeToIdleSeconds="300"
timeToIdleSeconds="6"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
</ehcache>
\ No newline at end of file
......@@ -18,5 +18,6 @@ E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\co
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\dto\ScreeningDTO.java
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\dto\SerumDTO.java
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\dto\GastroscopyDetailDTO.java
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\dto\NameDTO.java
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\model\DataPlat.java
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\dto\GastroscopyDTO.java
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment