You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.5 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.rehome.jpahefengweather.service;
import com.rehome.jpahefengweather.dto.ForecastWeatherDto;
import com.rehome.jpahefengweather.dto.HefengWeatherResultDto;
import com.rehome.jpahefengweather.dto.NowWeatherDto;
import com.rehome.jpahefengweather.entity.ForecastWeather;
import com.rehome.jpahefengweather.entity.NowWeather;
import java.util.List;
public interface HefengWeatherService {
/**
* 查询全国3000+个市县区
* @return NowWeather
*/
List<NowWeather> findNowWeatherByLocationIdAndDate(String locationId, String date);
/**
* 查询全国3000+个市县区,反向排序
* @return NowWeather
*/
List<NowWeather> findNowWeatherByLocationIdAndDateOrderByCreateDateDesc(String locationId, String date);
/**
* 保存实时天气数据
*/
void saveNowWeather(NowWeather nowWeather);
/**
* 从和风天气开放平台 获取区、县实时天气数据,然后保存到表
*/
void saveHefengWeatherByLocationNameEn(String locationNameEn);
/**
* 从和风天气开放平台 获取区、县 每日天气预报数据,然后保存到表
*/
void saveHefengFutureWeatherByLocationNameEn(String locationNameEn);
/**
* 查询全国3000+个市县区
* @return NowWeather
*/
List<ForecastWeather> findForecastWeatherByLocationIdAndDate(String locationId, String date);
/**
* 查询全国3000+个市县区,反向排序
* @return NowWeather
*/
List<ForecastWeather> findForecastWeatherByLocationIdAndDateOrderByCreateDateDesc(String locationId, String date);
/**
* 保存实时天气数据
*/
void saveForecastWeather(ForecastWeather nowWeather);
/**
* 获取实时天气
* @return NowWeatherDto
*/
NowWeatherDto findNowWeatherByLocationIdAndDateDto(String locationId);
/**
* 获取历史天气
* @return List<NowWeatherDto>
*/
List<NowWeatherDto> findHistoryWeatherByLocationIdAndDateDto(String locationId, String date);
/**
* 查询天气预报
* @return List<ForecastWeather>
*/
List<ForecastWeatherDto> findForecastWeatherByLocationIdAndDateDto(String locationId, String date);
/**
* 和风天气根据位置id和日期查询实时天气和天气预报后整合数据到一个dto提供给api调用
* @return List<ForecastWeather>
*/
HefengWeatherResultDto getHefengWeatherResultDtoByLocationIdAndDateDto(String locationId, String date);
}