<?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.njcn.device.pq.mapper.VersionMapper">

    <select id="selectVersion" resultType="com.njcn.device.pq.pojo.vo.VersionVO">
        select
            Id,
            Name,
            Protocol,
            Date,
            Dev_Type,
            Version_Type,
            case ISNULL(File) when 1 then 0 else 1 end as isFile,
            File_Name,
            Version_Flag,
            Remark,
            State
        from
            cld_version
        <where>
            State = 1
            and Dev_Type = #{param.devType}
            and Id not in
            <foreach collection="param.versionIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </where>
    </select>
</mapper>
