KKSU
2024-05-11 15fdce679c6ccf46b3283cc0523670f8dff7d13f
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
28
29
30
31
32
33
34
35
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 = "获取国家")
    @PostMapping(value = "/countries")
    public FebsResponse countriesApi() {
        return countryService.countries();
    }
 
    @ApiOperation(value = "获取联赛", notes = "获取联赛")
    @PostMapping(value = "/leagues")
    public FebsResponse leagues(LeaguesApiDto leaguesApiDto) {
 
        return countryService.leagues(leaguesApiDto);
 
    }
}