| | |
| | | <result column="play_num" property="playNum" /> |
| | | <result column="collect_num" property="collectNum" /> |
| | | <result column="comment_num" property="commentNum" /> |
| | | <result column="thumbs_up_num" property="thumbsUpNum" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="audit_pass_time" property="auditPassTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | |
| | | <result column="play_num" property="playNum" /> |
| | | <result column="collect_num" property="collectNum" /> |
| | | <result column="comment_num" property="commentNum" /> |
| | | <result column="thumbs_up_num" property="thumbsUpNum" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="audit_pass_time" property="auditPassTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | |
| | | <result column="title" property="title" /> |
| | | <result column="collect_num" property="collectNum" /> |
| | | <result column="comment_num" property="commentNum" /> |
| | | <result column="thumbs_up_num" property="thumbsUpNum" /> |
| | | <result column="status" property="status" /> |
| | | <result column="video_content_type" property="videoContentType" /> |
| | | <result column="video_type" property="videoType" /> |
| | |
| | | LV.play_num, |
| | | LV.collect_num, |
| | | LV.comment_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.collect_num, |
| | | LV.comment_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.collect_num, |
| | | LV.comment_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | WHEN #{video.id} THEN #{video.countNum} |
| | | </foreach> |
| | | ELSE comment_num |
| | | END |
| | | WHERE id IN |
| | | <foreach collection="list" item="video" open="(" separator="," close=")"> |
| | | #{video.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="updateThumbsUpNumBatch"> |
| | | UPDATE lmk_video |
| | | SET thumbs_up_num = CASE id |
| | | <foreach collection="list" item="video"> |
| | | WHEN #{video.id} THEN #{video.countNum} |
| | | </foreach> |
| | | ELSE thumbs_up_num |
| | | END |
| | | WHERE id IN |
| | | <foreach collection="list" item="video" open="(" separator="," close=")"> |
| | |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.comment_num, |
| | | LV.collect_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | 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' AND LV.video_type = #{query.videoType} |
| | | ORDER BY |
| | | LMC.create_time DESC |
| | | </select> |
| | | |
| | | <select id="getAuthorLikeVideoPage" 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.video_content_type, |
| | | LV.video_type, |
| | | LV.video_imgs, |
| | | LV.id, |
| | | LM.nick_name as authorName, |
| | | LM.face as authorAvatar |
| | | FROM |
| | | lmk_thumbs_up_record 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.thumbs_up_type = 'video' AND LV.video_type = #{query.videoType} |
| | | ORDER BY |
| | | LMC.create_time DESC |
| | | </select> |
| | |
| | | LV.play_num, |
| | | LV.collect_num, |
| | | LV.comment_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | LV.play_num, |
| | | LV.collect_num, |
| | | LV.comment_num, |
| | | LV.thumbs_up_num, |
| | | LV.weight, |
| | | LV.audit_pass_time, |
| | | LV.update_time, |
| | |
| | | <if test="query.authorId != null and query.authorId != ''">AND LV.author_id = #{query.authorId}</if> |
| | | <if test="query.status != null and query.status != ''">AND LV.status = #{query.status}</if> |
| | | </select> |
| | | |
| | | <resultMap id="EsResultMap" type="cn.lili.modules.lmk.domain.es.VideoIndex"> |
| | | <id column="id" property="id"/> |
| | | <result column="author_id" property="authorId" /> |
| | | <result column="authorName" property="authorName" /> |
| | | <result column="authorAvatar" property="authorAvatar" /> |
| | | <result column="cover_url" property="coverFileKey" /> |
| | | <result column="video_file_key" property="videoFileKey" /> |
| | | <result column="video_fit" property="videoFit" /> |
| | | <result column="video_duration" property="videoDuration" /> |
| | | <result column="title" property="title" /> |
| | | <result column="status" property="status" /> |
| | | <result column="recommend" property="recommend" /> |
| | | <result column="video_content_type" property="videoContentType" /> |
| | | <result column="video_type" property="videoType" /> |
| | | <result column="video_imgs" property="videoImgs" /> |
| | | <collection property="goodsList" column="id" select="getVideoGoods" ofType="cn.lili.modules.lmk.domain.vo.VideoGoodsDetailVO"/> |
| | | <collection property="tagList" column="id" select="getVideoTags" ofType="cn.lili.modules.lmk.domain.vo.SimpleVideoTagVO"/> |
| | | </resultMap> |
| | | |
| | | <select id="getVideoTags" resultType="cn.lili.modules.lmk.domain.vo.SimpleVideoTagVO"> |
| | | SELECT |
| | | LVT.id, |
| | | LVT.tag_name as tagName |
| | | FROM |
| | | lmk_video_tag_ref LVTR |
| | | INNER JOIN lmk_video_tag LVT ON LVTR.video_tag_id = LVT.id AND LVT.delete_flag = 0 |
| | | WHERE |
| | | LVTR.video_id = #{id} |
| | | </select> |
| | | |
| | | <select id="getEsPage" parameterType="int" resultMap="EsResultMap"> |
| | | 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 |
| | | LIMIT #{start}, #{pageSize} |
| | | </select> |
| | | |
| | | </mapper> |