| | |
| | | */ |
| | | IPage recommendVideo(IPage page, @Param("query") VideoQuery query); |
| | | |
| | | List<WxVideoVO> recommendVideoList(@Param("query") VideoQuery query); |
| | | |
| | | IPage recommendHealthVideo(IPage page, @Param("query") WxHealthVideoQuery query); |
| | | |
| | | |
| | |
| | | import cn.lili.cache.CachePrefix; |
| | | import cn.lili.common.properties.RocketmqCustomProperties; |
| | | import cn.lili.common.security.context.UserContext; |
| | | import cn.lili.common.utils.CommonUtil; |
| | | import cn.lili.elasticsearch.EsSuffix; |
| | | import cn.lili.modules.lmk.constant.RedisKeyExpireConstant; |
| | | import cn.lili.modules.lmk.domain.dto.VideoEsUpdateDTO; |
| | |
| | | import org.springframework.data.elasticsearch.core.SearchHits; |
| | | import org.springframework.data.elasticsearch.core.query.NativeSearchQuery; |
| | | import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import cn.lili.utils.PageUtil; |
| | |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | switch (query.getVideoFrom()) { |
| | | case "recommend":// 加载推荐视频 |
| | | baseMapper.recommendVideo(page, query); |
| | | //推荐视频重新排序 |
| | | List<WxVideoVO> records = page.getRecords(); |
| | | Collections.shuffle(records); |
| | | break; |
| | | case "author": // 加载视频主页我发布的视频 |
| | | AuthorVideoQuery query1 = new AuthorVideoQuery(); |
| | |
| | | ORDER BY |
| | | LV.create_time DESC |
| | | </select> |
| | | <select id="recommendVideoList" resultMap="WxResultMap"> |
| | | SELECT |
| | | LV.author_id, |
| | | LV.cover_url, |
| | | LV.video_fit, |
| | | LV.video_duration, |
| | | LV.video_file_key, |
| | | LV.title, |
| | | LV.goods_view_num, |
| | | LV.goods_order_num, |
| | | LV.recommend, |
| | | LV.status, |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | | LV.create_time, |
| | | LV.video_content_type, |
| | | LV.video_type, |
| | | LV.video_imgs, |
| | | 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.video_type = #{query.videoType} |
| | | ORDER BY |
| | | LV.create_time DESC |
| | | </select> |
| | | |
| | | <select id="goodsSimilarlyPage" resultMap="WxResultMap"> |
| | | SELECT |
| | |
| | | @ApiOperation(value = "分页获取商品列表") |
| | | @GetMapping(value = "/sku/list") |
| | | public ResultMessage<IPage<GoodsSku>> getSkuByPage(GoodsSearchParams goodsSearchParams) { |
| | | return ResultUtil.data(goodsSkuService.getGoodsSkuByPage(goodsSearchParams)); |
| | | IPage<GoodsSku> goodsSkuByPage = goodsSkuService.getGoodsSkuByPage(goodsSearchParams); |
| | | goodsSkuByPage.getRecords().forEach(goodsSku -> { |
| | | String thumbnail = goodsSku.getThumbnail(); |
| | | if (StringUtils.isNotBlank(thumbnail)&&!thumbnail.contains("http")) { |
| | | goodsSku.setThumbnail(cosUtil.getPreviewUrl(goodsSku.getThumbnail())); |
| | | } |
| | | }); |
| | | return ResultUtil.data(goodsSkuByPage); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取待审核商品") |