| | |
| | | import javax.mail.MessagingException; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.nio.file.Files; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | private DeviceService deviceService; |
| | | |
| | | private final EmailSpringUtil emailSpringUtil; |
| | | private final CityWeatherForecastService cityWeatherForecastService; |
| | | |
| | | public PubController(EmailSpringUtil emailSpringUtil) { |
| | | public PubController(EmailSpringUtil emailSpringUtil, CityWeatherForecastService cityWeatherForecastService) { |
| | | this.emailSpringUtil = emailSpringUtil; |
| | | this.cityWeatherForecastService = cityWeatherForecastService; |
| | | } |
| | | |
| | | @GetMapping("insertHistoryDaily") |
| | |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | @GetMapping("insertCityWeatherForecast") |
| | | @ApiOperation(value = "城市每日天气预测", notes = "城市每日天气预测") |
| | | public ResultMessage insertCityWeatherForecast() { |
| | | cityWeatherForecastService.insertCityWeatherForecast(); |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | @GetMapping("insertHistoryMonthly") |
| | | @ApiOperation(value = "月数据", notes = "月数据") |
| | | public ResultMessage insertHistoryMonthly() { |