whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/controller/WeatherController.java
@@ -1,19 +1,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 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);
    }
}