| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <?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.sckw.slope.detection.dao.mysql.KwsDeviceMapper">
- <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
- <!--@mbg.generated-->
- <!--@Table kws_device-->
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="attribute" jdbcType="INTEGER" property="attribute" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="alias" jdbcType="VARCHAR" property="alias" />
- <result column="sn_code" jdbcType="VARCHAR" property="snCode" />
- <result column="model_id" jdbcType="BIGINT" property="modelId" />
- <result column="valid_time" jdbcType="TIMESTAMP" property="validTime" />
- <result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
- <result column="interface" jdbcType="VARCHAR" property="interFace" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- <result column="status" jdbcType="TINYINT" property="status" />
- <result column="create_by" jdbcType="BIGINT" property="createBy" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_by" jdbcType="BIGINT" property="updateBy" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, `attribute`, `name`, `alias`, sn_code, model_id, valid_time, secret_key, inter_face,
- remark, `status`, create_by, create_time, update_by, update_time, del_flag
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from kws_device
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- <!--@mbg.generated-->
- delete from kws_device
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
- <!--@mbg.generated-->
- insert into kws_device (id, `attribute`, `name`,
- `alias`, sn_code, model_id,
- valid_time, secret_key, interface,
- remark, `status`, create_by,
- create_time, update_by, update_time,
- del_flag)
- values (#{id,jdbcType=BIGINT}, #{attribute,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
- #{alias,jdbcType=VARCHAR}, #{snCode,jdbcType=VARCHAR}, #{modelId,jdbcType=BIGINT},
- #{validTime,jdbcType=TIMESTAMP}, #{secretKey,jdbcType=VARCHAR}, #{interFace,jdbcType=VARCHAR},
- #{remark,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{createBy,jdbcType=BIGINT},
- #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
- #{delFlag,jdbcType=TINYINT})
- </insert>
- <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
- <!--@mbg.generated-->
- insert into kws_device
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="attribute != null">
- `attribute`,
- </if>
- <if test="name != null">
- `name`,
- </if>
- <if test="alias != null">
- `alias`,
- </if>
- <if test="snCode != null">
- sn_code,
- </if>
- <if test="modelId != null">
- model_id,
- </if>
- <if test="validTime != null">
- valid_time,
- </if>
- <if test="secretKey != null">
- secret_key,
- </if>
- <if test="interFace != null">
- interface,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="status != null">
- `status`,
- </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="delFlag != null">
- del_flag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="attribute != null">
- #{attribute,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="alias != null">
- #{alias,jdbcType=VARCHAR},
- </if>
- <if test="snCode != null">
- #{snCode,jdbcType=VARCHAR},
- </if>
- <if test="modelId != null">
- #{modelId,jdbcType=BIGINT},
- </if>
- <if test="validTime != null">
- #{validTime,jdbcType=TIMESTAMP},
- </if>
- <if test="secretKey != null">
- #{secretKey,jdbcType=VARCHAR},
- </if>
- <if test="interFace != null">
- #{interFace,jdbcType=VARCHAR},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=TINYINT},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=BIGINT},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=BIGINT},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="delFlag != null">
- #{delFlag,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
- <!--@mbg.generated-->
- update kws_device
- <set>
- <if test="attribute != null">
- `attribute` = #{attribute,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- `name` = #{name,jdbcType=VARCHAR},
- </if>
- <if test="alias != null">
- `alias` = #{alias,jdbcType=VARCHAR},
- </if>
- <if test="snCode != null">
- sn_code = #{snCode,jdbcType=VARCHAR},
- </if>
- <if test="modelId != null">
- model_id = #{modelId,jdbcType=BIGINT},
- </if>
- <if test="validTime != null">
- valid_time = #{validTime,jdbcType=TIMESTAMP},
- </if>
- <if test="secretKey != null">
- secret_key = #{secretKey,jdbcType=VARCHAR},
- </if>
- <if test="interFace != null">
- inter_face = #{interFace,jdbcType=VARCHAR},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- `status` = #{status,jdbcType=TINYINT},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=BIGINT},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy,jdbcType=BIGINT},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="delFlag != null">
- del_flag = #{delFlag,jdbcType=TINYINT},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
- <!--@mbg.generated-->
- update kws_device
- set `attribute` = #{attribute,jdbcType=INTEGER},
- `name` = #{name,jdbcType=VARCHAR},
- `alias` = #{alias,jdbcType=VARCHAR},
- sn_code = #{snCode,jdbcType=VARCHAR},
- model_id = #{modelId,jdbcType=BIGINT},
- valid_time = #{validTime,jdbcType=TIMESTAMP},
- secret_key = #{secretKey,jdbcType=VARCHAR},
- inter_face = #{interFace,jdbcType=VARCHAR},
- remark = #{remark,jdbcType=VARCHAR},
- `status` = #{status,jdbcType=TINYINT},
- create_by = #{createBy,jdbcType=BIGINT},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_by = #{updateBy,jdbcType=BIGINT},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- del_flag = #{delFlag,jdbcType=TINYINT}
- where id = #{id,jdbcType=BIGINT}
- </update>
- </mapper>
|