| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | private String title; |
| | | |
| | | @ApiModelProperty("视频封面") |
| | | @NotBlank(message = "视频封面不能为空") |
| | | @NotBlank(message = "视频封面不能为空", groups = {Add.class, Update.class}) |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("视频标签") |
| | |
| | | * @param query |
| | | */ |
| | | IPage getAuthorVideoPage(IPage page, @Param("query") AuthorVideoQuery query); |
| | | |
| | | /** |
| | | * 获取视频主页作者收藏的视频分页 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | */ |
| | | IPage getAuthorCollectVideoPage(IPage page, @Param("query") AuthorVideoQuery query); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Result getAuthorVideoPage(AuthorVideoQuery query); |
| | | |
| | | /** |
| | | * 获取视频主页作者收藏视频分页 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result getAuthorCollectVideoPage(AuthorVideoQuery query); |
| | | } |
| | |
| | | // 3. 获取视频临时访问地址、设置视频标签 |
| | | page.getRecords().forEach(v -> { |
| | | v.setTagList(tagMap.get(v.getId())); |
| | | // v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); |
| | | v.setCoverUrl(cosUtil.getPreviewUrl(v.getCoverUrl())); |
| | | }); |
| | | } |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | |
| | | public Result getAuthorVideoPage(AuthorVideoQuery query) { |
| | | IPage<WxVideoVO> page = PageUtil.getPage(query, WxVideoVO.class); |
| | | baseMapper.getAuthorVideoPage(page, query); |
| | | for (WxVideoVO vo : page.getRecords()) { |
| | | vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverUrl())); |
| | | vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoUrl())); |
| | | } |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | @Override |
| | | public Result getAuthorCollectVideoPage(AuthorVideoQuery query) { |
| | | IPage<WxVideoVO> page = PageUtil.getPage(query, WxVideoVO.class); |
| | | baseMapper.getAuthorCollectVideoPage(page, query); |
| | | for (WxVideoVO vo : page.getRecords()) { |
| | | vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverUrl())); |
| | | vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoUrl())); |
| | | vo.setCollected(Boolean.TRUE); |
| | | } |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | } |
| | |
| | | LV.video_duration, |
| | | LV.video_file_key, |
| | | LV.title, |
| | | LV.goods_id, |
| | | LV.goods_view_num, |
| | | LV.goods_order_num, |
| | | LV.recommend, |
| | | LV.status, |
| | | LV.play_num, |
| | |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | | LV.id |
| | | LV.id, |
| | | LM.nick_name as authorName, |
| | | LM.face as authorAvatar |
| | | FROM |
| | | lmk_video LV |
| | | LEFT JOIN li_member LM ON LV.author_id = LM.id |
| | | WHERE |
| | | LV.delete_flag = 0 AND LV.status = '1' AND LV.author_id = #{query.authorId} |
| | | ORDER BY |
| | | LV.collect_num DESC |
| | | </select> |
| | | |
| | | <select id="getAuthorCollectVideoPage" resultMap="WxResultMap"> |
| | | SELECT |
| | | LV.author_id, |
| | | LV.cover_url, |
| | | LV.video_fit, |
| | | LV.video_duration, |
| | | LV.video_file_key, |
| | | LV.title, |
| | | LV.goods_id, |
| | | LV.goods_view_num, |
| | | LV.goods_order_num, |
| | | LV.recommend, |
| | | LV.status, |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | | LV.id, |
| | | LM.nick_name as authorName, |
| | | LM.face as authorAvatar |
| | | FROM |
| | | lmk_my_collect LMC |
| | | INNER JOIN lmk_video LV ON LMC.ref_id = LV.id AND LV.delete_flag = 0 AND LV.status = '1' |
| | | LEFT JOIN li_member LM ON LV.author_id = LM.id |
| | | WHERE |
| | | LMC.delete_flag = 0 AND LMC.user_id = #{query.authorId} AND LMC.collect_type = 'video' |
| | | ORDER BY |
| | | LMC.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |