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

缓存和修改sql

parent 50827879
...@@ -194,6 +194,11 @@ public class DataPlatController { ...@@ -194,6 +194,11 @@ public class DataPlatController {
return ResponseUtil.error(e.toString(), "获取医院相关统计(申请数、认证数、开展筛查数)失败!"); 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> { ...@@ -79,4 +79,7 @@ public interface DataPlatMapper extends BaseMapper<DataPlat> {
* @return com.sict.data.dto.HospStatisticsDTO * @return com.sict.data.dto.HospStatisticsDTO
*/ */
HospStatisticsDTO getHospStatistics(); HospStatisticsDTO getHospStatistics();
List<NameDTO> getNameDTOs();
} }
...@@ -83,4 +83,6 @@ public interface IDataPlatService extends IService<DataPlat> { ...@@ -83,4 +83,6 @@ public interface IDataPlatService extends IService<DataPlat> {
* @return com.sict.data.dto.HospStatisticsDTO * @return com.sict.data.dto.HospStatisticsDTO
*/ */
HospStatisticsDTO getHospStatistics(); HospStatisticsDTO getHospStatistics();
List<NameDTO> getnamDtos();
} }
...@@ -224,4 +224,11 @@ public class DataPlatServiceImpl extends ServiceImpl<DataPlatMapper, DataPlat> i ...@@ -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 @@ ...@@ -2,20 +2,13 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false"> updateCheck="false">
<defaultCache
eternal="false"
maxElementsInMemory="10000"
overflowToDisk="false"
timeToIdleSeconds="300"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getScreeningRank" name="getScreeningRank"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
...@@ -23,10 +16,10 @@ ...@@ -23,10 +16,10 @@
<cache <cache
name="getScreeningRankEn" name="getScreeningRankEn"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
...@@ -34,73 +27,82 @@ ...@@ -34,73 +27,82 @@
<cache <cache
name="getSerumStatistics" name="getSerumStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getGastroscopyStatistics" name="getGastroscopyStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getScreeningStatistics" name="getScreeningStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getGastroscopyDetailResultStatistics" name="getGastroscopyDetailResultStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getRiskAssessStatistics" name="getRiskAssessStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getGastroscopyDetailStatistics" name="getGastroscopyDetailStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getHospStatistics" name="getHospStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getComplexStatistics" name="getComplexStatistics"
eternal="false" 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" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="6"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
</ehcache> </ehcache>
\ No newline at end of file
#Generated by Maven Integration for Eclipse #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 version=1.0-SNAPSHOT
groupId=dataplat groupId=dataplat
m2e.projectName=data-plat m2e.projectName=data-plat
......
...@@ -2,20 +2,13 @@ ...@@ -2,20 +2,13 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false"> updateCheck="false">
<defaultCache
eternal="false"
maxElementsInMemory="10000"
overflowToDisk="false"
timeToIdleSeconds="300"
timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getScreeningRank" name="getScreeningRank"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
...@@ -23,10 +16,10 @@ ...@@ -23,10 +16,10 @@
<cache <cache
name="getScreeningRankEn" name="getScreeningRankEn"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
...@@ -34,73 +27,82 @@ ...@@ -34,73 +27,82 @@
<cache <cache
name="getSerumStatistics" name="getSerumStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getGastroscopyStatistics" name="getGastroscopyStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getScreeningStatistics" name="getScreeningStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getGastroscopyDetailResultStatistics" name="getGastroscopyDetailResultStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getRiskAssessStatistics" name="getRiskAssessStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getGastroscopyDetailStatistics" name="getGastroscopyDetailStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getHospStatistics" name="getHospStatistics"
eternal="false" eternal="false"
maxElementsInMemory="10000" maxElementsInMemory="100000"
overflowToDisk="false" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="3600"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
<cache <cache
name="getComplexStatistics" name="getComplexStatistics"
eternal="false" 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" overflowToDisk="false"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="300" timeToIdleSeconds="6"
timeToLiveSeconds="86400" timeToLiveSeconds="86400"
memoryStoreEvictionPolicy="LRU" /> memoryStoreEvictionPolicy="LRU" />
</ehcache> </ehcache>
\ No newline at end of file
...@@ -18,5 +18,6 @@ E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\co ...@@ -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\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\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\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\model\DataPlat.java
E:\BIGDATA\HadoopSpace\早筛综合统计页面展示\data-plat\src\main\java\com\sict\data\dto\GastroscopyDTO.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