<?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.event.mapper.majornetwork.PqDeviceMapper">

    <resultMap type="com.njcn.event.pojo.po.PqDevice" id="PqDeviceMap">
        <result property="id" column="Id" jdbcType="VARCHAR"/>
        <result property="devModel" column="Dev_Model" jdbcType="INTEGER"/>
        <result property="devDataType" column="Dev_Data_Type" jdbcType="INTEGER"/>
        <result property="runFlag" column="Run_Flag" jdbcType="INTEGER"/>
        <result property="comFlag" column="Com_Flag" jdbcType="INTEGER"/>
        <result property="manufacturer" column="Manufacturer" jdbcType="VARCHAR"/>
        <result property="checkFlag" column="Check_Flag" jdbcType="INTEGER"/>
        <result property="frontType" column="Front_Type" jdbcType="VARCHAR"/>
        <result property="devType" column="Dev_Type" jdbcType="VARCHAR"/>
        <result property="ip" column="IP" jdbcType="VARCHAR"/>
        <result property="callFlag" column="Call_Flag" jdbcType="INTEGER"/>
        <result property="port" column="Port" jdbcType="INTEGER"/>
        <result property="series" column="Series" jdbcType="VARCHAR"/>
        <result property="devKey" column="Dev_Key" jdbcType="VARCHAR"/>
        <result property="nodeId" column="Node_Id" jdbcType="VARCHAR"/>
        <result property="loginTime" column="Login_Time" jdbcType="TIMESTAMP"/>
        <result property="updateTime" column="Update_Time" jdbcType="TIMESTAMP"/>
        <result property="thisTimeCheck" column="This_Time_Check" jdbcType="TIMESTAMP"/>
        <result property="nextTimeCheck" column="Next_Time_Check" jdbcType="TIMESTAMP"/>
        <result property="electroplate" column="Electroplate" jdbcType="INTEGER"/>
        <result property="onTime" column="On_Time" jdbcType="INTEGER"/>
        <result property="contract" column="Contract" jdbcType="VARCHAR"/>
        <result property="sim" column="Sim" jdbcType="VARCHAR"/>
    </resultMap>

    <select id="queryRunFlagByDeviceIndexs" resultMap="PqDeviceMap">
        select
        Id, Run_Flag from pq_device where Id in
        <foreach collection="deviceIndexes" index="index" item="item" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
</mapper>
