<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.VideoEquipmentSpecificMapper">
    <select id="findBySpecificIdAndVideoIdIn" resultType="com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific">
        SELECT
            v.id,
            v.equipment_specific_id AS equipmentSpecificId,
            v.video_id AS videoId
        FROM
            `wl_video_equipment_specific` v
        <where>
            <if test="equipmentSpecificId != null">
                v.equipment_specific_id = #{equipmentSpecificId}
            </if>
            <if test="list != null and list.size() >0">
                AND v.video_id IN
                <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
        </where>
    </select>
</mapper>
