<?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.fuyuanshen.app.mapper.equipment.AppDeviceTypeMapper">

    <resultMap id="BaseResultMap" type="com.fuyuanshen.app.domain.APPDeviceType">
        <id property="id" column="id"/>
        <result property="typeName" column="type_name"/>
        <result property="isSupportBle" column="is_support_ble"/>
        <result property="locateMode" column="locate_mode"/>
        <result property="networkWay" column="network_way"/>
        <result property="createBy" column="create_by"/>
        <result property="updateBy" column="update_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="customerId" column="customer_id"/>
        <result property="communicationMode" column="communication_mode"/>
    </resultMap>

    <sql id="Base_Column_List">
        id
        ,type_name,is_support_ble,locate_mode,network_way,create_by,
        update_by,create_time,update_time,customer_id,communication_mode
    </sql>

    <!-- 查询设备类型列表 -->
    <select id="appTypeList" resultType="com.fuyuanshen.app.domain.APPDeviceType">
        select d.* from app_device_type as d
        <where>
            and d.customer_id = #{criteria.customerId}
        </where>
        order by d.create_time desc
    </select>
</mapper>
