Commit d9bd51bf by 111-PC\111

[+]kafka消费数据修改

1 parent 79dd3e4a
<?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="cn.com.glsx.smart.mapper.SmartSceneDataMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.smart.entity.SmartSceneData">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="scene_id" jdbcType="BIGINT" property="sceneId" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="sort" jdbcType="TINYINT" property="sort" />
<result column="param_key" jdbcType="VARCHAR" property="paramKey" />
<result column="device_id" jdbcType="VARCHAR" property="deviceId" />
<result column="param_value" jdbcType="VARCHAR" property="paramValue" />
<result column="condition_rule" jdbcType="TINYINT" property="conditionRule" />
<result column="execute_cycle" jdbcType="TINYINT" property="executeCycle" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, scene_id, `type`, sort, param_key, device_id, param_value
</sql>
<resultMap id="BaseResultMap" type="cn.com.glsx.smart.entity.SmartSceneData">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="scene_id" jdbcType="BIGINT" property="sceneId"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="sort" jdbcType="TINYINT" property="sort"/>
<result column="param_key" jdbcType="VARCHAR" property="paramKey"/>
<result column="device_id" jdbcType="VARCHAR" property="deviceId"/>
<result column="param_value" jdbcType="VARCHAR" property="paramValue"/>
<result column="condition_rule" jdbcType="TINYINT" property="conditionRule"/>
<result column="execute_cycle" jdbcType="TINYINT" property="executeCycle"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, scene_id, `type`, sort, param_key, device_id, param_value
</sql>
<select id="findSceneDataByDeviceId" resultMap="BaseResultMap">
select t1.*,t2.condition_rule,t2.execute_cycle from smart_scene_data t1 left join smart_scene t2 on t1.scene_id=t2.id
where device_id=#{deviceId} and param_key='scene_condition_status' and t2.status=1
select t1.scene_id,t2.condition_rule,t2.execute_cycle from smart_scene t2 left join smart_scene_data t1 on t1.scene_id=t2.id
where device_id=#{deviceId} and param_key='scene_condition_status' and t2.status=1 GROUP BY t1.scene_id
</select>
<select id="findBySceneId" resultMap="BaseResultMap">
<select id="findBySceneId" resultMap="BaseResultMap">
select t1.*,t2.condition_rule,t2.execute_cycle from smart_scene_data t1 left join smart_scene t2 on t1.scene_id=t2.id
where scene_id=#{sceneId} and (param_key='scene_condition_status' or param_key='scene_condition_time') and t2.status=1
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!