KKSU
2024-05-13 ff8e73504ab40738ce1c90f6394bbd7b88260f5e
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.basketball_nba.controller;
 
import cc.mrbird.febs.common.entity.FebsResponse;
import cc.mrbird.febs.dapp.basketball_nba.service.BasketballService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@Slf4j
@RequiredArgsConstructor
@CrossOrigin("*")
@RestController
@Api(value = "BASKETBALL", tags = "BASKETBALL")
@RequestMapping(value = "/dapi/basketball")
public class BasketballController {
 
    private final BasketballService basketballService;
 
    @ApiOperation(value = "赛季", notes = "赛季")
    @PostMapping(value = "/seasons")
    public FebsResponse seasons() {
        return basketballService.seasons();
    }
 
    @ApiOperation(value = "联赛", notes = "联赛")
    @PostMapping(value = "/leagues")
    public FebsResponse leagues() {
        return basketballService.leagues();
    }
 
    @ApiOperation(value = "球队", notes = "球队")
    @PostMapping(value = "/teams")
    public FebsResponse teams() {
        return basketballService.teams();
    }
}