修改了查询近一个月和今天火点信息的代码模块

This commit is contained in:
DESKTOP-G8BCEP0\HP 2021-08-11 11:21:05 +08:00
parent 2687fed5da
commit a2cf66488e
3 changed files with 10 additions and 3 deletions

View File

@ -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)
List<Map<String,Object>> selectCountyName(String code);
/**
* 根据市编码查询信息
* @param cityCode
* @return
*/
List<CountyEntity> findByCityCode(String cityCode);
}

View File

@ -120,7 +120,7 @@ public class FirePointServiceImpl implements FirePointService {
String proName = byProCode.get(0).getProName();
return firePointDao.selectTodayFirePoint(addTime,proName);
}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();
return firePointDao.selectTodayFirePoint(addTime,cityName);
}else {
@ -322,7 +322,7 @@ public class FirePointServiceImpl implements FirePointService {
String proName = byProCode.get(0).getProName();
return query.selectFirePointByMonth(proName,startTime,endTime);
}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();
return query.selectFirePointByMonthCity(cityName,startTime,endTime);
}else {

View File

@ -38,7 +38,7 @@ spring.cache.type = redis
spring.redis.database = 8
spring.redis.host = localhost
spring.redis.port = 6379
#spring.redis.password=sdust2020
spring.redis.password=sdust2020
spring.redis.timeout = 10000
spring.redis.lettuce.pool.max-active = 100
spring.redis.lettuce.pool.max-wait = 10000