zxl
2025-06-04 f4d3dd1e4964297648f1b7bb80470d70f1b8fcec
buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java
@@ -1,7 +1,12 @@
package cn.lili.controller.lmk;
import cn.lili.base.AbsQuery;
import cn.lili.group.Update;
import cn.lili.group.Add;
import cn.lili.modules.lmk.domain.form.VideoFootPrintForm;
import cn.lili.modules.lmk.domain.form.VideoHomePageInfoForm;
import cn.lili.modules.lmk.domain.query.AuthorVideoQuery;
import cn.lili.modules.member.entity.dos.FootPrint;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import lombok.RequiredArgsConstructor;
@@ -57,21 +62,45 @@
        return videoService.remove(ids);
    }
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    public Result page(VideoQuery query) {
        return videoService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    public Result detail(@PathVariable("id") Integer id) {
    public Result detail(@PathVariable("id") String id) {
        return videoService.detail(id);
    }
    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "列表")
    public Result list() {
        return videoService.all();
    @GetMapping("/recommend")
    @ApiOperation(value = "视频推荐", notes = "视频推荐")
    public Result recommendVideo(VideoQuery query) {
        return videoService.recommendVideo(query);
    }
    @PostMapping("/view/record")
    @ApiOperation(value = "保存观看记录", notes = "保存观看记录")
    public Result saveViewRecord(@RequestBody VideoFootPrintForm form) {
        return videoService.saveViewRecord(form);
    }
    @GetMapping("/author-info/{authorId}")
    @ApiOperation(value = "获取视频主页作者信息", notes = "获取视频主页作者信息")
    public Result getAuthorInfo(@PathVariable("authorId") String authorId) {
        return videoService.getAuthorInfo(authorId);
    }
    @GetMapping("/author-video-page")
    @ApiOperation(value = "获取视频主页作者视频分页", notes = "获取视频主页作者视频分页")
    public Result getAuthorVideoPage(AuthorVideoQuery query) {
        return videoService.getAuthorVideoPage(query);
    }
    @GetMapping("/author-collect-video-page")
    @ApiOperation(value = "获取视频主页作者收藏的视频分页", notes = "获取视频主页作者收藏的视频分页")
    public Result getAuthorCollectVideoPage(AuthorVideoQuery query) {
        return videoService.getAuthorCollectVideoPage(query);
    }
    @PostMapping("/home-page-info-edit")
    @ApiOperation(value = "保存视频主页的个人信息修改", notes = "保存视频主页的个人信息修改")
    public Result homePageInfoEdit(@RequestBody @Validated VideoHomePageInfoForm form) {
        return videoService.homePageInfoEdit(form);
    }
}