|
|
@@ -1,249 +1,43 @@
|
|
|
<?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.IotProductMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.middle.platform.manage.biz.domain.IotProduct">
|
|
|
+ <resultMap id="BaseResultMap" type="com.middle.platform.manage.biz.entity.IotProduct">
|
|
|
<!--@mbg.generated-->
|
|
|
<!--@Table iot_product-->
|
|
|
- <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
<result column="secret" jdbcType="VARCHAR" property="secret" />
|
|
|
<result column="node_type" jdbcType="TINYINT" property="nodeType" />
|
|
|
<result column="network_type" jdbcType="TINYINT" property="networkType" />
|
|
|
<result column="report_protocol" jdbcType="TINYINT" property="reportProtocol" />
|
|
|
+ <result column="vendors" jdbcType="TINYINT" property="vendors" />
|
|
|
<result column="data_format" jdbcType="TINYINT" property="dataFormat" />
|
|
|
<result column="auth_type" jdbcType="TINYINT" property="authType" />
|
|
|
<result column="tag" jdbcType="VARCHAR" property="tag" />
|
|
|
<result column="size" jdbcType="INTEGER" property="size" />
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
- <result column="create_by" jdbcType="INTEGER" property="createBy" />
|
|
|
+ <result column="create_by" jdbcType="BIGINT" property="createBy" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="update_by" jdbcType="INTEGER" property="updateBy" />
|
|
|
+ <result column="update_by" jdbcType="BIGINT" 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, code, `name`, secret, node_type, network_type, report_protocol, data_format,
|
|
|
- auth_type, tag, `size`, remark, create_by, create_time, update_by, update_time, delete_time,
|
|
|
+ id, code, `name`, secret, node_type, network_type, report_protocol, data_format, vendors,
|
|
|
+ auth_type, tag, `size`, 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_product
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
+
|
|
|
+ <select id="pageQuery" resultType="com.middle.platform.manage.biz.domain.vo.IotProductVo">
|
|
|
+ select *
|
|
|
+ from iot_product ip
|
|
|
+ <where>
|
|
|
+ <if test="keywords != null and keywords != ''">
|
|
|
+ and ip.name like concat('%', #{keywords,jdbcType=VARCHAR}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
- <!--@mbg.generated-->
|
|
|
- delete from iot_product
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </delete>
|
|
|
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.middle.platform.manage.biz.domain.IotProduct" useGeneratedKeys="true">
|
|
|
- <!--@mbg.generated-->
|
|
|
- insert into iot_product (code, `name`, secret,
|
|
|
- node_type, network_type, report_protocol,
|
|
|
- data_format, auth_type, tag,
|
|
|
- `size`, remark, create_by,
|
|
|
- create_time, update_by, update_time,
|
|
|
- delete_time, del_flag)
|
|
|
- values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{secret,jdbcType=VARCHAR},
|
|
|
- #{nodeType,jdbcType=TINYINT}, #{networkType,jdbcType=TINYINT}, #{reportProtocol,jdbcType=TINYINT},
|
|
|
- #{dataFormat,jdbcType=TINYINT}, #{authType,jdbcType=TINYINT}, #{tag,jdbcType=VARCHAR},
|
|
|
- #{size,jdbcType=INTEGER}, #{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.IotProduct" useGeneratedKeys="true">
|
|
|
- <!--@mbg.generated-->
|
|
|
- insert into iot_product
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="code != null">
|
|
|
- code,
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- `name`,
|
|
|
- </if>
|
|
|
- <if test="secret != null">
|
|
|
- secret,
|
|
|
- </if>
|
|
|
- <if test="nodeType != null">
|
|
|
- node_type,
|
|
|
- </if>
|
|
|
- <if test="networkType != null">
|
|
|
- network_type,
|
|
|
- </if>
|
|
|
- <if test="reportProtocol != null">
|
|
|
- report_protocol,
|
|
|
- </if>
|
|
|
- <if test="dataFormat != null">
|
|
|
- data_format,
|
|
|
- </if>
|
|
|
- <if test="authType != null">
|
|
|
- auth_type,
|
|
|
- </if>
|
|
|
- <if test="tag != null">
|
|
|
- tag,
|
|
|
- </if>
|
|
|
- <if test="size != null">
|
|
|
- `size`,
|
|
|
- </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="code != null">
|
|
|
- #{code,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="secret != null">
|
|
|
- #{secret,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="nodeType != null">
|
|
|
- #{nodeType,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="networkType != null">
|
|
|
- #{networkType,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="reportProtocol != null">
|
|
|
- #{reportProtocol,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="dataFormat != null">
|
|
|
- #{dataFormat,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="authType != null">
|
|
|
- #{authType,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="tag != null">
|
|
|
- #{tag,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="size != null">
|
|
|
- #{size,jdbcType=INTEGER},
|
|
|
- </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.IotProduct">
|
|
|
- <!--@mbg.generated-->
|
|
|
- update iot_product
|
|
|
- <set>
|
|
|
- <if test="code != null">
|
|
|
- code = #{code,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- `name` = #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="secret != null">
|
|
|
- secret = #{secret,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="nodeType != null">
|
|
|
- node_type = #{nodeType,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="networkType != null">
|
|
|
- network_type = #{networkType,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="reportProtocol != null">
|
|
|
- report_protocol = #{reportProtocol,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="dataFormat != null">
|
|
|
- data_format = #{dataFormat,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="authType != null">
|
|
|
- auth_type = #{authType,jdbcType=TINYINT},
|
|
|
- </if>
|
|
|
- <if test="tag != null">
|
|
|
- tag = #{tag,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="size != null">
|
|
|
- `size` = #{size,jdbcType=INTEGER},
|
|
|
- </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.IotProduct">
|
|
|
- <!--@mbg.generated-->
|
|
|
- update iot_product
|
|
|
- set code = #{code,jdbcType=VARCHAR},
|
|
|
- `name` = #{name,jdbcType=VARCHAR},
|
|
|
- secret = #{secret,jdbcType=VARCHAR},
|
|
|
- node_type = #{nodeType,jdbcType=TINYINT},
|
|
|
- network_type = #{networkType,jdbcType=TINYINT},
|
|
|
- report_protocol = #{reportProtocol,jdbcType=TINYINT},
|
|
|
- data_format = #{dataFormat,jdbcType=TINYINT},
|
|
|
- auth_type = #{authType,jdbcType=TINYINT},
|
|
|
- tag = #{tag,jdbcType=VARCHAR},
|
|
|
- `size` = #{size,jdbcType=INTEGER},
|
|
|
- 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>
|
|
|
-</mapper>
|
|
|
+</mapper>
|