<?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.prepare.harmonic.mapper.mysql.line.PmsMonitorMapper">


    <select id="queryConfigMonitor" resultType="com.njcn.device.pms.pojo.po.Monitor">
        select pm.* from pms_monitor pm left join sys_dict_data sdd on pm.Monitor_Tag =sdd.Id
        <where>
            <if test="codeList != null and codeList.size() >0">
                AND sdd.code IN
                <foreach collection="codeList" item="item" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="monitorIdList != null and monitorIdList.size() >0">
                AND pm.id IN
                <foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
        </where>
    </select>
</mapper>
