KKSU
2024-05-11 dcc9e23af5cc800768dfa7802be5962862598a1d
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
36
37
38
39
40
41
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 = "/timezone")
    public FebsResponse timezone() {
        return countryService.timezone();
    }
 
    @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);
 
    }
}