zxl
4 天以前 8063ee7eee51bfe25a09428e6efc60f828b270c6
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
package cn.lili.controller.lmk;
 
import cn.lili.base.Result;
import cn.lili.group.Add;
import cn.lili.group.Update;
import cn.lili.modules.lmk.domain.form.HealthVideoForm;
import cn.lili.modules.lmk.domain.query.HealthVideoQuery;
import cn.lili.modules.lmk.service.VideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
@Validated
@RequiredArgsConstructor
@Api(value = "大健康", tags = "大健康")
@RestController
@RequestMapping("/manager/lkm/health")
public class HealthController {
    private final VideoService videoService;
 
    @PostMapping("/healthVideo")
    @ApiOperation(value = "大健康视频发布", notes = "大健康视频发布")
    public Result healthVideo(@RequestBody @Validated(Add.class) HealthVideoForm form) {
        return videoService.healthVideo(form);
    }
    @PostMapping("/updateHealthVideo")
    @ApiOperation(value = "大健康视频发布", notes = "大健康视频发布")
    public Result updateHealthVideo(@RequestBody @Validated(Update.class) HealthVideoForm form) {
        return videoService.updateHealthVideo(form);
    }
    @PostMapping("/page")
    @ApiOperation(value = "大健康视频列表", notes = "大健康视频列表")
    public Result page(@RequestBody HealthVideoQuery query) {
        return videoService.healthPage(query);
    }
    //删除大厨神视频
    @PostMapping("/del/{id}")
    @ApiOperation(value = "删除大厨神视频", notes = "删除大厨神视频")
    public Result delHealth(@PathVariable("id") String id) {
        return videoService.delHealth(id);
    }
}