SmartSceneDataMapper.xml 1.04 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="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="param_value" jdbcType="VARCHAR" property="paramValue" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, scene_id, `type`, sort, param_key, param_value
  </sql>
  <select id="findByTemplateId" resultMap="BaseResultMap">
        select *
    from smart_scene_data where scene_id=#{templateId} and type=2
  </select>
</mapper>