xiaoyong931011
2021-12-15 3e803d1ec0583cb60dfedc63a8e31fb7b29fffdc
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
package cc.mrbird.febs.video.controller;
 
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.utils.FebsUtil;
import cc.mrbird.febs.video.entity.VideoMasterSourceEntity;
import cc.mrbird.febs.video.service.IVideoMasterSourceService;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
 
@Controller("videoView")
@RequiredArgsConstructor
public class ViewController {
 
    private final IVideoMasterSourceService videoMasterSourceService;
 
    @GetMapping(FebsConstant.VIEW_PREFIX + "video/category")
    @RequiresPermissions("category:view")
    public String category() {
        return FebsUtil.view("video/video/category");
    }
 
    @GetMapping(FebsConstant.VIEW_PREFIX + "video/list")
    @RequiresPermissions("video:view")
    public String videoList() {
        return FebsUtil.view("video/video/video-list");
    }
 
    @GetMapping(FebsConstant.VIEW_PREFIX + "video/source/list")
    @RequiresPermissions("source:view")
    public String source() {
        return FebsUtil.view("video/video/video-source-list");
    }
 
    @GetMapping(FebsConstant.VIEW_PREFIX + "video/source/add")
    @RequiresPermissions("source:add")
    public String sourceAdd() {
        return FebsUtil.view("video/video/video-source-add");
    }
 
    @GetMapping(FebsConstant.VIEW_PREFIX + "video/source/update/{id}")
    @RequiresPermissions("source:update")
    public String sourceUpdate(@PathVariable Long id, Model model) {
        VideoMasterSourceEntity source = this.videoMasterSourceService.getById(id);
        model.addAttribute("obj", source);
        return FebsUtil.view("video/video/video-source-update");
    }
}