优化
This commit is contained in:
parent
e64f24d8a3
commit
103bdb901c
@ -54,7 +54,6 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers(HttpMethod.POST, "/insertFirePoint").permitAll()
|
.antMatchers(HttpMethod.POST, "/insertFirePoint").permitAll()
|
||||||
.antMatchers(HttpMethod.POST, "/insertAppTask").permitAll()
|
.antMatchers(HttpMethod.POST, "/insertAppTask").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/selectAppTask").permitAll()
|
.antMatchers(HttpMethod.GET, "/selectAppTask").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/selectFirePointBetweenSeven").permitAll()
|
|
||||||
.antMatchers(HttpMethod.GET, "/selectFirePointNum").permitAll()
|
.antMatchers(HttpMethod.GET, "/selectFirePointNum").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/selectCityName").permitAll()
|
.antMatchers(HttpMethod.GET, "/selectCityName").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/weather/cityName").permitAll()
|
.antMatchers(HttpMethod.GET, "/weather/cityName").permitAll()
|
||||||
|
@ -28,13 +28,6 @@ public interface FirePointService {
|
|||||||
*/
|
*/
|
||||||
List<FirePointEntity> selectTodayFirePoint(String countyCode);
|
List<FirePointEntity> selectTodayFirePoint(String countyCode);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询近一周天的火点信息
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<FirePointEntity> selectFirePointBetweenSeven();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询近一个月的火点信息
|
* 查询近一个月的火点信息
|
||||||
*
|
*
|
||||||
|
@ -306,24 +306,6 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
return firePointQueryHelper.queryFirePoint(countyCode, startTimeString, endTimeString, null, null);
|
return firePointQueryHelper.queryFirePoint(countyCode, startTimeString, endTimeString, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询近一周的火点信息
|
|
||||||
*/
|
|
||||||
// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null")
|
|
||||||
@Override
|
|
||||||
public List<FirePointEntity> selectFirePointBetweenSeven() {
|
|
||||||
|
|
||||||
LocalDateTime startTime1 = LocalDateTime.now().minusDays(7);
|
|
||||||
LocalDateTime startTime2 = LocalDateTime.of(startTime1.getYear(), startTime1.getMonth(), startTime1.getDayOfMonth(), 0, 0, 0, 0);
|
|
||||||
String startTimeString = DateTimeUtils.localDateTimeToString(startTime2);
|
|
||||||
|
|
||||||
LocalDateTime endTime1 = LocalDateTime.now().plusDays(1);
|
|
||||||
LocalDateTime endTime2 = LocalDateTime.of(endTime1.getYear(), endTime1.getMonth(), endTime1.getDayOfMonth(), 0, 0, 0, 0);
|
|
||||||
String endTimeString = DateTimeUtils.localDateTimeToString(endTime2);
|
|
||||||
|
|
||||||
return firePointQueryHelper.queryFirePoint(null, startTimeString, endTimeString, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询近一个月的火点信息
|
* 查询近一个月的火点信息
|
||||||
*/
|
*/
|
||||||
|
@ -150,18 +150,6 @@ public class FirePointController {
|
|||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询近一周的火点信息
|
|
||||||
*/
|
|
||||||
@GetMapping("/selectFirePointBetweenSeven")
|
|
||||||
public String selectFirePointBetweenSeven() {
|
|
||||||
List<FirePointEntity> firePointEntities = firePointService.selectFirePointBetweenSeven();
|
|
||||||
if (firePointEntities == null || firePointEntities.size() == 0) {
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有火点数据", locale);
|
|
||||||
}
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointEntities, locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询近一个月的火点信息
|
* 查询近一个月的火点信息
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user