增加注释
This commit is contained in:
parent
ae89050d8d
commit
bd4bac2ced
@ -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.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.module.datacenter.controller.admin.weather.vo.WeatherInfoVO;
|
import cn.iocoder.yudao.module.datacenter.controller.admin.weather.vo.WeatherInfoVO;
|
||||||
import cn.iocoder.yudao.module.datacenter.utlis.GoodWeatherUtil;
|
import cn.iocoder.yudao.module.datacenter.utlis.GoodWeatherUtil;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@Validated
|
@Validated
|
||||||
public class WeatherApi {
|
public class WeatherApi {
|
||||||
@GetMapping(value = "/getWeather")
|
@GetMapping(value = "/getWeather")
|
||||||
|
@Operation(summary = "获得输入城市的天气")
|
||||||
public CommonResult<WeatherInfoVO> getWeather(String cityCode) {
|
public CommonResult<WeatherInfoVO> getWeather(String cityCode) {
|
||||||
String weatherData = GoodWeatherUtil.getWeatherData(cityCode);
|
String weatherData = GoodWeatherUtil.getWeatherData(cityCode);
|
||||||
WeatherInfoVO weatherInfo = GoodWeatherUtil.GetWeather(weatherData);
|
WeatherInfoVO weatherInfo = GoodWeatherUtil.GetWeather(weatherData);
|
||||||
|
Loading…
Reference in New Issue
Block a user