ThingsModelMapper.xml
2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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.ThingsModelMapper">
<resultMap type="org.thingsboard.server.dao.yunteng.entities.TkThingsModelEntity" id="listMap">
<result property="id" column="id"/>
<result property="functionType" column="function_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
<result property="callType" column="call_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
<result property="accessMode" column="access_mode"/>
<result property="eventType" column="event_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
<result property="functionName" column="function_name"/>
<result property="identifier" column="identifier"/>
<result property="tenantId" column="tenant_id"/>
<result property="status" column="status"/>
<result property="functionJson" column="function_json"
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
<result property="extensionDesc" column="extension_desc"
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
<result property="deviceProfileId" column="device_profile_id"/>
<result property="remark" column="remark"/>
<result property="categoryId" column="category_id"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<update id="changeTSLStatus">
UPDATE tk_things_model
SET status =#{status}
<where>
tenant_id = #{tenantId}
AND device_profile_id = #{deviceProfileId}
</where>
</update>
<select id="getByCategoryId" resultMap="listMap">
SELECT *
FROM tk_things_model
<where>
category_id = #{categoryId}
</where>
</select>
</mapper>