DeviceProfileMapper.xml
1.39 KB
<?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="org.thingsboard.server.dao.yunteng.mapper.DeviceProfileMapper">
<resultMap type="org.thingsboard.server.common.data.yunteng.dto.DeviceProfileDTO" id="deviceProfileMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="convertJs" column="convert_js"/>
<result property="description" column="description"/>
<result property="transportType" column="transport_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
<result property="tbProfileId" column="tb_profile_id"/>
<result property="tenantId" column="tenant_id"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="creator" column="creator"/>
<result property="updater" column="updater"/>
</resultMap>
<select id="getDeviceProfileInfo" resultMap="deviceProfileMap">
SELECT id,name
,convert_js,description,transport_type,tb_profile_id,tenant_id,create_time,update_time,creator,updater FROM
iotfs_device_profile
<where>
<if test="id !=null and id!=''">
AND id = #{id}
</if>
</where>
</select>
</mapper>