| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <?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="com.middle.platform.manage.biz.mapper.IotDeviceMapper">
- <resultMap id="BaseResultMap" type="com.middle.platform.manage.biz.domain.IotDevice">
- <!--@mbg.generated-->
- <!--@Table iot_device-->
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="product_id" jdbcType="INTEGER" property="productId" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="sn" jdbcType="VARCHAR" property="sn" />
- <result column="guid" jdbcType="VARCHAR" property="guid" />
- <result column="subtitle" jdbcType="VARCHAR" property="subtitle" />
- <result column="lon" jdbcType="DECIMAL" property="lon" />
- <result column="lat" jdbcType="DECIMAL" property="lat" />
- <result column="address" jdbcType="VARCHAR" property="address" />
- <result column="online_time" jdbcType="TIMESTAMP" property="onlineTime" />
- <result column="status" jdbcType="TINYINT" property="status" />
- <result column="enable_flag" jdbcType="TINYINT" property="enableFlag" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- <result column="create_by" jdbcType="INTEGER" property="createBy" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_by" jdbcType="INTEGER" property="updateBy" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
- <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, product_id, `name`, sn, guid, subtitle, lon, lat, address, online_time, `status`, enable_flag,
- remark, create_by, create_time, update_by, update_time, delete_time, del_flag
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from iot_device
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--@mbg.generated-->
- delete from iot_device
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.middle.platform.manage.biz.domain.IotDevice" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into iot_device (product_id, `name`, sn,
- guid, subtitle, lon,
- lat, address, online_time,
- `status`, enable_flag, remark,
- create_by, create_time, update_by,
- update_time, delete_time, del_flag
- )
- values (#{productId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{sn,jdbcType=VARCHAR},
- #{guid,jdbcType=VARCHAR}, #{subtitle,jdbcType=VARCHAR}, #{lon,jdbcType=DECIMAL},
- #{lat,jdbcType=DECIMAL}, #{address,jdbcType=VARCHAR}, #{onlineTime,jdbcType=TIMESTAMP},
- #{status,jdbcType=TINYINT}, #{enableFlag,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
- #{createBy,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=INTEGER},
- #{updateTime,jdbcType=TIMESTAMP}, #{deleteTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}
- )
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.middle.platform.manage.biz.domain.IotDevice" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into iot_device
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="productId != null">
- product_id,
- </if>
- <if test="name != null">
- `name`,
- </if>
- <if test="sn != null">
- sn,
- </if>
- <if test="guid != null">
- guid,
- </if>
- <if test="subtitle != null">
- subtitle,
- </if>
- <if test="lon != null">
- lon,
- </if>
- <if test="lat != null">
- lat,
- </if>
- <if test="address != null">
- address,
- </if>
- <if test="onlineTime != null">
- online_time,
- </if>
- <if test="status != null">
- `status`,
- </if>
- <if test="enableFlag != null">
- enable_flag,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="deleteTime != null">
- delete_time,
- </if>
- <if test="delFlag != null">
- del_flag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="productId != null">
- #{productId,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="sn != null">
- #{sn,jdbcType=VARCHAR},
- </if>
- <if test="guid != null">
- #{guid,jdbcType=VARCHAR},
- </if>
- <if test="subtitle != null">
- #{subtitle,jdbcType=VARCHAR},
- </if>
- <if test="lon != null">
- #{lon,jdbcType=DECIMAL},
- </if>
- <if test="lat != null">
- #{lat,jdbcType=DECIMAL},
- </if>
- <if test="address != null">
- #{address,jdbcType=VARCHAR},
- </if>
- <if test="onlineTime != null">
- #{onlineTime,jdbcType=TIMESTAMP},
- </if>
- <if test="status != null">
- #{status,jdbcType=TINYINT},
- </if>
- <if test="enableFlag != null">
- #{enableFlag,jdbcType=TINYINT},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=INTEGER},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deleteTime != null">
- #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="delFlag != null">
- #{delFlag,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.middle.platform.manage.biz.domain.IotDevice">
- <!--@mbg.generated-->
- update iot_device
- <set>
- <if test="productId != null">
- product_id = #{productId,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- `name` = #{name,jdbcType=VARCHAR},
- </if>
- <if test="sn != null">
- sn = #{sn,jdbcType=VARCHAR},
- </if>
- <if test="guid != null">
- guid = #{guid,jdbcType=VARCHAR},
- </if>
- <if test="subtitle != null">
- subtitle = #{subtitle,jdbcType=VARCHAR},
- </if>
- <if test="lon != null">
- lon = #{lon,jdbcType=DECIMAL},
- </if>
- <if test="lat != null">
- lat = #{lat,jdbcType=DECIMAL},
- </if>
- <if test="address != null">
- address = #{address,jdbcType=VARCHAR},
- </if>
- <if test="onlineTime != null">
- online_time = #{onlineTime,jdbcType=TIMESTAMP},
- </if>
- <if test="status != null">
- `status` = #{status,jdbcType=TINYINT},
- </if>
- <if test="enableFlag != null">
- enable_flag = #{enableFlag,jdbcType=TINYINT},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy,jdbcType=INTEGER},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deleteTime != null">
- delete_time = #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="delFlag != null">
- del_flag = #{delFlag,jdbcType=TINYINT},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.middle.platform.manage.biz.domain.IotDevice">
- <!--@mbg.generated-->
- update iot_device
- set product_id = #{productId,jdbcType=INTEGER},
- `name` = #{name,jdbcType=VARCHAR},
- sn = #{sn,jdbcType=VARCHAR},
- guid = #{guid,jdbcType=VARCHAR},
- subtitle = #{subtitle,jdbcType=VARCHAR},
- lon = #{lon,jdbcType=DECIMAL},
- lat = #{lat,jdbcType=DECIMAL},
- address = #{address,jdbcType=VARCHAR},
- online_time = #{onlineTime,jdbcType=TIMESTAMP},
- `status` = #{status,jdbcType=TINYINT},
- enable_flag = #{enableFlag,jdbcType=TINYINT},
- remark = #{remark,jdbcType=VARCHAR},
- create_by = #{createBy,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_by = #{updateBy,jdbcType=INTEGER},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- delete_time = #{deleteTime,jdbcType=TIMESTAMP},
- del_flag = #{delFlag,jdbcType=TINYINT}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <select id="select" resultMap="BaseResultMap" parameterType="com.middle.platform.manage.biz.domain.IotDevice">
- select
- <include refid="Base_Column_List" />
- from iot_device
- </select>
- </mapper>
|