修改了查询近一个月和今天火点信息的代码模块
This commit is contained in:
parent
2687fed5da
commit
a2cf66488e
@ -20,4 +20,11 @@ public interface CountyDao extends JpaRepository<CountyEntity,Long> {
|
|||||||
*/
|
*/
|
||||||
@Query(value = "select county_name cityname,county_code citycode from county where city_code = :code",nativeQuery = true)
|
@Query(value = "select county_name cityname,county_code citycode from county where city_code = :code",nativeQuery = true)
|
||||||
List<Map<String,Object>> selectCountyName(String code);
|
List<Map<String,Object>> selectCountyName(String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据市编码查询信息
|
||||||
|
* @param cityCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CountyEntity> findByCityCode(String cityCode);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
String proName = byProCode.get(0).getProName();
|
String proName = byProCode.get(0).getProName();
|
||||||
return firePointDao.selectTodayFirePoint(addTime,proName);
|
return firePointDao.selectTodayFirePoint(addTime,proName);
|
||||||
}else if("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))){
|
}else if("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))){
|
||||||
List<CityEntity> byCityCode = cityDao.findByCityCode(countyCode);
|
List<CountyEntity> byCityCode = countyDao.findByCityCode(countyCode);
|
||||||
String cityName = byCityCode.get(0).getCityName();
|
String cityName = byCityCode.get(0).getCityName();
|
||||||
return firePointDao.selectTodayFirePoint(addTime,cityName);
|
return firePointDao.selectTodayFirePoint(addTime,cityName);
|
||||||
}else {
|
}else {
|
||||||
@ -322,7 +322,7 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
String proName = byProCode.get(0).getProName();
|
String proName = byProCode.get(0).getProName();
|
||||||
return query.selectFirePointByMonth(proName,startTime,endTime);
|
return query.selectFirePointByMonth(proName,startTime,endTime);
|
||||||
}else if("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))){
|
}else if("00".equals(countyCode.substring(4)) && !"0000".equals(countyCode.substring(2))){
|
||||||
List<CityEntity> byCityCode = cityDao.findByCityCode(countyCode);
|
List<CountyEntity> byCityCode = countyDao.findByCityCode(countyCode);
|
||||||
String cityName = byCityCode.get(0).getCityName();
|
String cityName = byCityCode.get(0).getCityName();
|
||||||
return query.selectFirePointByMonthCity(cityName,startTime,endTime);
|
return query.selectFirePointByMonthCity(cityName,startTime,endTime);
|
||||||
}else {
|
}else {
|
||||||
|
@ -38,7 +38,7 @@ spring.cache.type = redis
|
|||||||
spring.redis.database = 8
|
spring.redis.database = 8
|
||||||
spring.redis.host = localhost
|
spring.redis.host = localhost
|
||||||
spring.redis.port = 6379
|
spring.redis.port = 6379
|
||||||
#spring.redis.password=sdust2020
|
spring.redis.password=sdust2020
|
||||||
spring.redis.timeout = 10000
|
spring.redis.timeout = 10000
|
||||||
spring.redis.lettuce.pool.max-active = 100
|
spring.redis.lettuce.pool.max-active = 100
|
||||||
spring.redis.lettuce.pool.max-wait = 10000
|
spring.redis.lettuce.pool.max-wait = 10000
|
||||||
|
Loading…
Reference in New Issue
Block a user