whyclxw
2022-01-05 700d30d541fa85357fdd80cecb8ff8c5baff2ae8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 {
    @Resource
    private WeatherService service;
 
    @PostMapping("/get")
    @ApiOperation(value = "获取天气-百度")
    public Response get(@RequestBody WeatherCity city){
        return service.get2(city);
    }
}