zxl
23 小时以前 98f55ebbcce815983853bf2d96485a306c5cb051
framework/src/main/resources/mapper/lmk/ThumbsUpRecordMapper.xml
@@ -41,4 +41,46 @@
            LTUR.delete_flag = 0
    </select>
    <select id="countNumGroupByComment" resultType="cn.lili.modules.lmk.domain.vo.CollectTypeNumVO">
        SELECT
               LVC.id as id,
               count(LTUR.ref_id) as countNum
        FROM
             lmk_video_comment LVC
                LEFT JOIN lmk_thumbs_up_record LTUR ON LTUR.ref_id = LVC.id AND LTUR.thumbs_up_type = 'video_comment' AND LTUR.delete_flag = 0
        WHERE
              LVC.thumbs_up_job = 1
              AND LVC.delete_flag = 0
        GROUP BY
             LTUR.ref_id
    </select>
    <select id="countNumGroupByVideo" resultType="cn.lili.modules.lmk.domain.vo.CollectTypeNumVO">
        SELECT
            LV.id as id,
            count(LTUR.ref_id) as countNum
        FROM
            lmk_video LV
                LEFT JOIN lmk_thumbs_up_record LTUR ON LTUR.ref_id = LV.id AND LTUR.thumbs_up_type = 'video' AND LTUR.delete_flag = 0
        WHERE
            LV.thumbs_up_num_job = 1
            AND LV.delete_flag = 0
        GROUP BY
            LTUR.ref_id
    </select>
    <select id="getThumbssByVideoIds" resultType="cn.lili.modules.lmk.domain.vo.SimpleMyThumbsUpVO">
        SELECT
            id,
            ref_id as refId
        FROM
            lmk_thumbs_up_record
        WHERE
            user_id = #{userId}
            AND delete_flag = 0
            AND thumbs_up_type = 'video'
            AND ref_id IN <foreach collection="videoIds" open="(" item="videoId" close=")" separator=",">#{videoId}</foreach>
    </select>
</mapper>