package cc.mrbird.febs.dapp.soccer.controller; import cc.mrbird.febs.common.entity.FebsResponse; import cc.mrbird.febs.dapp.soccer.dto.LeaguesApiDto; import cc.mrbird.febs.dapp.soccer.service.CountryService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; @Slf4j @RequiredArgsConstructor @CrossOrigin("*") @RestController @Api(value = "FOOTBALL", tags = "FOOTBALL") @RequestMapping(value = "/dapi/footBall") public class SoccerController { private final CountryService countryService; @ApiOperation(value = "获取国家", notes = "获取国家") @GetMapping(value = "/countries") public FebsResponse countriesApi() { return countryService.countries(); } @ApiOperation(value = "获取联赛", notes = "获取联赛") @PostMapping(value = "/leagues") public FebsResponse leagues(LeaguesApiDto leaguesApiDto) { return countryService.leagues(leaguesApiDto); } }