<?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.usky.meeting.mapper.MeetingFaceMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.usky.meeting.domain.MeetingFace">
        <id column="fid" property="fid" />
        <result column="face_base" property="faceBase" />
        <result column="create_time" property="createTime" />
        <result column="vef_num" property="vefNum" />
        <result column="face_name" property="faceName" />
        <result column="remark" property="remark" />
        <result column="face_status" property="faceStatus" />
        <result column="card_num" property="cardNum" />
        <result column="bind_device" property="bindDevice" />
        <result column="dept_id" property="deptId" />
        <result column="tenant_id" property="tenantId" />
        <result column="user_id" property="userId" />
    </resultMap>
    <select id="getDeviceInfo" resultType="com.usky.meeting.service.vo.DmpDeviceInfoVO">
        SELECT dd.id,dd.device_id,dd.device_name,dd.product_id,dd.tenant_id,dd.company_code,dd.install_address,dd.service_status,dd.product_code,dd.device_uuid
            FROM dmp_device dd
        <where>
            <if test="deviceIdList != null and deviceIdList.size() > 0">
                AND dd.id in
                <foreach item="item" collection="deviceIdList" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            <if test="1 == 1">
                and dd.delete_flag = 0
            </if>
        </where>
    </select>

</mapper>
