ConfigurationContentMapper.xml
1.64 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
<?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.ConfigurationContentMapper">
<resultMap id="entity" type="org.thingsboard.server.dao.yunteng.entities.TkConfigurationContentEntity">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="configurationId" column="configuration_id"/>
<result property="type" column="type"/>
<result property="remark" column="remark"/>
<result property="content" column="content"/>
<result property="createTime" column="create_time"/>
<result property="creator" column="creator"/>
<result property="tenantId" column="tenant_id"/>
<result property="updater" column="updater"/>
</resultMap>
<sql id="columns">
id, configuration_id, name, type, content ,tenant_id ,create_time, creator, updater ,update_time, remark
</sql>
<select id="getPage" resultMap="entity">
SELECT tk_configuration_content.*
FROM tk_configuration_content
INNER JOIN tk_configuration_center on (tk_configuration_center.id=tk_configuration_content.configuration_id)
<where>
<if test="queryMap.tenantId !=null and queryMap.tenantId !=''">
AND tk_configuration_content.tenant_id = #{queryMap.tenantId}
</if>
<if test="queryMap.isTemplate !=null">
AND tk_configuration_center.is_template = #{queryMap.isTemplate}
</if>
</where>
</select>
</mapper>