xinwei #3

Merged
root merged 30 commits from xinwei into master 2024-08-15 09:53:30 +08:00
Showing only changes of commit bd4bac2ced - Show all commits

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.datacenter.controller.admin.weather;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.datacenter.controller.admin.weather.vo.WeatherInfoVO;
import cn.iocoder.yudao.module.datacenter.utlis.GoodWeatherUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
@Validated
public class WeatherApi {
@GetMapping(value = "/getWeather")
@Operation(summary = "获得输入城市的天气")
public CommonResult<WeatherInfoVO> getWeather(String cityCode) {
String weatherData = GoodWeatherUtil.getWeatherData(cityCode);
WeatherInfoVO weatherInfo = GoodWeatherUtil.GetWeather(weatherData);