VodLabelDictController.java
2.53 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
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.label.VodLabelPageDTO;
import com.subsidy.model.VodLabelDictDO;
import com.subsidy.service.VodLableDictService;
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 DengMin
* @since 2022-07-19
*/
@RestController
@Api(tags = "视频库类目表")
@RequestMapping("/vodLabelDict")
public class VodLabelDictController {
@Autowired
private VodLableDictService vodLableDictService;
@PostMapping(value = "addVodLabel")
@ApiOperation("添加视频类目: labelName/类目名称")
@LoginRequired
public ResponseVO addVodLabel(@RequestBody VodLabelDictDO vodLabelDictDO) {
vodLableDictService.save(vodLabelDictDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "updateVodLabel")
@ApiOperation("添加视频类目: id/类目ID、labelName/类目名称")
@LoginRequired
public ResponseVO updateVodLabel(@RequestBody VodLabelDictDO vodLabelDictDO) {
vodLableDictService.updateById(vodLabelDictDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "deleteVodLabel")
@ApiOperation("添加视频类目: id/类目ID")
@LoginRequired
public ResponseVO deleteVodLabel(@RequestBody VodLabelDictDO vodLabelDictDO) {
vodLableDictService.removeById(vodLabelDictDO.getId());
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "queryVodLabelPage")
@ApiOperation("分页查询视频类目: labelName/名称、pageNum/但前页数、pageSize/每页显示条数")
@LoginRequired
public ResponseVO queryVodLabelPage(@RequestBody VodLabelPageDTO vodLabelPageDTO) {
return ResponseData.generateCreatedResponse(0, vodLableDictService.queryVodLabelPage(vodLabelPageDTO));
}
@PostMapping(value = "queryVodLabel")
@ApiOperation("查询全部视频类目")
@LoginRequired
public ResponseVO queryVodLabel() {
return ResponseData.generateCreatedResponse(0, vodLableDictService.list());
}
}