package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.WeatherCity; import com.whyc.service.WeatherService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController @RequestMapping("weather") @Api(tags = "天气查询") public class WeatherController extends BaseController{ @Resource private WeatherService service; @PostMapping("/get") @ApiOperation(value = "获取天气-百度") public Response get(@RequestBody WeatherCity city){ return service.get2(city); } }