package org.dromara.system.controller;

import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.system.domain.vo.WeatherVo;
import org.dromara.system.service.IWeatherService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/dzbc/weather")
@RequiredArgsConstructor
public class WeatherController extends BaseController {

    private final IWeatherService weatherService;

    @GetMapping("/fuzhou")
    public R<WeatherVo> getFuzhouWeather() {
        WeatherVo weather = weatherService.getFuzhouWeather();
        return R.ok(weather);
    }

    @GetMapping("/fuan")
    public R<WeatherVo> getFuAnWeather() {
        WeatherVo weather = weatherService.getFuAnWeather();
        return R.ok(weather);
    }
}
