| | |
| | | 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 lombok.extern.slf4j.Slf4j; |
| | | 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 = "天气查询") |
| | | @Slf4j |
| | | public class WeatherController { |
| | | public class WeatherController extends BaseController{ |
| | | @Resource |
| | | private WeatherService service; |
| | | |
| | | public Response get(){ |
| | | |
| | | return null; |
| | | @PostMapping("/get") |
| | | @ApiOperation(value = "获取天气-百度") |
| | | public Response get(@RequestBody WeatherCity city){ |
| | | return service.get2(city); |
| | | } |
| | | } |