MatchDictController.java
2.64 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.MatchDictDO;
import com.subsidy.service.MatchDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 赛事年份管理 前端控制器
* </p>
*
* @author Tuyp
* @since 2025-01-07
*/
@RestController
@Api(tags = "赛事年份管理")
@RequestMapping("/matchDict")
public class MatchDictController {
@Autowired
private MatchDictService matchDictService;
@PostMapping("matches")
@ApiOperation("查询赛事 matchName ")
public ResponseVO matches(@RequestBody MatchDictDO matchDictDO){
return ResponseData.generateCreatedResponse(0,matchDictService.matches(matchDictDO));
}
@PostMapping("addMatch")
@ApiOperation("新增赛事 matchName year startTime endTime status vodStartTime vodEndTime")
public ResponseVO addMatch(@RequestBody MatchDictDO matchDictDO){
return ResponseData.generateCreatedResponse(0,matchDictService.addMatch(matchDictDO));
}
@PostMapping("deleteMatch")
@ApiOperation("删除赛事 id ")
public ResponseVO deleteMatch(@RequestBody MatchDictDO matchDictDO){
return ResponseData.generateCreatedResponse(0,matchDictService.deleteMatch(matchDictDO));
}
@PostMapping("updateMatch")
@ApiOperation("修改赛事 id match startTime endTime vodStartTime vodEndTime fileStartTime fileEndTime ")
public ResponseVO updateMatch(@RequestBody MatchDictDO matchDictDO){
return ResponseData.generateCreatedResponse(0,matchDictService.updateMatch(matchDictDO));
}
@PostMapping("openMatch")
@ApiOperation("开启赛事 id ")
public ResponseVO openMatch(@RequestBody MatchDictDO matchDictDO){
return ResponseData.generateCreatedResponse(0,matchDictService.openMatch(matchDictDO));
}
@PostMapping("openedMatch")
@ApiOperation("查看开启的赛事")
public ResponseVO openedMatch(){
return ResponseData.generateCreatedResponse(0,matchDictService.openedMatch());
}
@PostMapping("openOneMatch")
@ApiOperation("查询单个赛事 id 赛事id")
public ResponseVO openOneMatch(@RequestBody MatchDictDO matchDictDO){
return ResponseData.generateCreatedResponse(0,matchDictService.openOneMatch(matchDictDO));
}
}