|
|
@@ -5,6 +5,7 @@
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
<result column="mac" jdbcType="VARCHAR" property="mac" />
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
+ <result column="alias" jdbcType="VARCHAR" property="alias" />
|
|
|
<result column="is_delete" jdbcType="CHAR" property="isDelete" />
|
|
|
<result column="product_id" jdbcType="VARCHAR" property="productId" />
|
|
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
|
@@ -27,7 +28,7 @@
|
|
|
data
|
|
|
</sql>
|
|
|
<sql id="Base_Column_Relation">
|
|
|
- d.id, d.mac, d.name, d.is_delete isDelete, d.product_id productId, d.description, d.createtime, d.modifytime,
|
|
|
+ d.id, d.mac, d.name, d.alias,d.is_delete isDelete, d.product_id productId, d.description, d.createtime, d.modifytime,
|
|
|
d.tenant_id tenantId, d.data
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
|
|
@@ -99,12 +100,12 @@
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.tuoren.forward.entity.Device">
|
|
|
- insert into device (id, mac, name,
|
|
|
+ insert into device (id, mac, name, alias,
|
|
|
is_delete, product_id, description,
|
|
|
createtime, modifytime, tenant_id,
|
|
|
lat,lng,address,radius,
|
|
|
data)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{mac,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{mac,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{alias,jdbcType=VARCHAR} ,
|
|
|
#{isDelete,jdbcType=CHAR}, #{productId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
|
|
#{createtime,jdbcType=TIMESTAMP}, #{modifytime,jdbcType=TIMESTAMP}, #{tenantId,jdbcType=VARCHAR},
|
|
|
#{lat,jdbcType=VARCHAR},#{lng,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR},
|
|
|
@@ -122,6 +123,9 @@
|
|
|
<if test="name != null">
|
|
|
name,
|
|
|
</if>
|
|
|
+ <if test="alias != null">
|
|
|
+ alias,
|
|
|
+ </if>
|
|
|
<if test="isDelete != null">
|
|
|
is_delete,
|
|
|
</if>
|
|
|
@@ -166,6 +170,9 @@
|
|
|
<if test="name != null">
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="alias != null">
|
|
|
+ #{alias,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="isDelete != null">
|
|
|
#{isDelete,jdbcType=CHAR},
|
|
|
</if>
|
|
|
@@ -210,6 +217,9 @@
|
|
|
<if test="name != null">
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="alias != null">
|
|
|
+ alias = #{alias,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="isDelete != null">
|
|
|
is_delete = #{isDelete,jdbcType=CHAR},
|
|
|
</if>
|
|
|
@@ -255,6 +265,9 @@
|
|
|
<if test="name != null">
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="alias != null">
|
|
|
+ alias = #{alias,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="isDelete != null">
|
|
|
is_delete = #{isDelete,jdbcType=CHAR},
|
|
|
</if>
|
|
|
@@ -295,6 +308,7 @@
|
|
|
update device
|
|
|
set mac = #{mac,jdbcType=VARCHAR},
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
+ alias = #{alias,jdbcType=VARCHAR},
|
|
|
is_delete = #{isDelete,jdbcType=CHAR},
|
|
|
product_id = #{productId,jdbcType=VARCHAR},
|
|
|
description = #{description,jdbcType=VARCHAR},
|
|
|
@@ -312,6 +326,7 @@
|
|
|
update device
|
|
|
set mac = #{mac,jdbcType=VARCHAR},
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
+ alias = #{alias,jdbcType=VARCHAR},
|
|
|
is_delete = #{isDelete,jdbcType=CHAR},
|
|
|
product_id = #{productId,jdbcType=VARCHAR},
|
|
|
description = #{description,jdbcType=VARCHAR},
|