xiangpei
7 天以前 cc1bab39263e90069ccef7139f71b2a4061780d1
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package cn.lili.modules.lmk.mapper;
 
import cn.lili.modules.lmk.domain.entity.Video;
import cn.lili.modules.lmk.domain.query.*;
import cn.lili.modules.lmk.domain.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * 视频内容 Mapper 接口
 *
 * @author xp
 * @since 2025-05-16
 */
@Mapper
public interface VideoMapper extends BaseMapper<Video> {
 
    /**
     * id查找视频内容
     * @param id
     * @return
     */
    VideoVO getById(String id);
 
    /**
    *  分页
    */
    IPage getPage(IPage page, @Param("query") VideoQuery query);
 
    /**
     * 管理端分页
     *
     * @param page
     * @param query
     */
    IPage managerPage(IPage page, @Param("query") ManagerVideoQuery query);
 
    /**
     * 查出5个推荐视频
     *
     * @return
     */
    IPage recommendVideo(IPage page, @Param("query") VideoQuery query);
 
    /**
     * 批量更新视频收藏数量
     *
     * @param numList
     */
    void updateCollectNumBatch(@Param("list") List<CollectTypeNumVO> numList);
 
    /**
     * 批量更新视频评论数量
     *
     * @param numList
     */
    void updateCommentNumBatch(@Param("list") List<CollectTypeNumVO> numList);
 
    /**
     * 视频主页作者信息
     *
     * @param authorId
     * @return
     */
    VideoAccountVO getAuthorInfo(@Param("authorId") String authorId, @Param("currentUserId") String currentUserId);
 
    /**
     * 获取作者的所有视频id
     *
     * @param authorId
     * @return
     */
    List<String> getVideoIdsByAuthor(@Param("authorId") String authorId);
 
    /**
     * 获取作者所有视频的收藏数之和
     *
     * @param videoIds
     * @return
     */
    Long countAuthorVideoCollectNum(@Param("videoIds") List<String> videoIds);
 
    /**
     * 获取视频主页-作者视频的分页
     *
     * @param page
     * @param query
     */
    IPage getAuthorVideoPage(IPage page, @Param("query") AuthorVideoQuery query);
 
    /**
     * 获取视频主页作者收藏的视频分页
     *
     * @param page
     * @param query
     */
    IPage getAuthorCollectVideoPage(IPage page, @Param("query") AuthorVideoQuery query);
 
    /**
     * 小程序-视频详情
     *
     * @param id
     * @return
     */
    WxEditVideoVO wxDetail(@Param("id") String id);
 
    /**
     * 大健康视频分页
     *
     * @param page
     * @param query
     */
    IPage healthPage(IPage page, @Param("query") HealthVideoQuery query);
 
    IPage kitchenPage(IPage page, @Param("query") KitchenVideoQuery query);
 
    /**
     * 获取视频悬挂商品
     *
     * @param videoId
     * @return
     */
    List<VideoGoodsDetailVO> getVideoGoods(@Param("id") String videoId);
}