| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?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.tdengine.DevicesMapper">
- <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.tdengine.Devices">
- <!--@mbg.generated-->
- <!--@Table devices-->
- <id column="ts" jdbcType="TIMESTAMP" property="ts" />
- <result column="tslver_id" jdbcType="INTEGER" property="tslverId" />
- <result column="line" jdbcType="VARCHAR" property="line" />
- <result column="val" jdbcType="VARCHAR" property="val" />
- <result column="msg_id" jdbcType="VARCHAR" property="msgId" />
- <result column="raw_ts" jdbcType="TIMESTAMP" property="rawTs" />
- <result column="guid" jdbcType="VARCHAR" property="guid" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- ts, tslver_id, line, val, msg_id, raw_ts, guid
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.util.Date" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from devicesv2.devices
- where ts = #{ts,jdbcType=TIMESTAMP}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.util.Date">
- <!--@mbg.generated-->
- delete from devicesv2.devices
- where ts = #{ts,jdbcType=TIMESTAMP}
- </delete>
- <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.tdengine.Devices">
- <!--@mbg.generated-->
- insert into devicesv2.devices (ts, tslver_id, line,
- val, msg_id, raw_ts,
- guid)
- values (#{ts,jdbcType=TIMESTAMP}, #{tslverId,jdbcType=INTEGER}, #{line,jdbcType=VARCHAR},
- #{val,jdbcType=VARCHAR}, #{msgId,jdbcType=VARCHAR}, #{rawTs,jdbcType=TIMESTAMP},
- #{guid,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.tdengine.Devices">
- <!--@mbg.generated-->
- insert into devicesv2.devices
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ts != null">
- ts,
- </if>
- <if test="tslverId != null">
- tslver_id,
- </if>
- <if test="line != null">
- line,
- </if>
- <if test="val != null">
- val,
- </if>
- <if test="msgId != null">
- msg_id,
- </if>
- <if test="rawTs != null">
- raw_ts,
- </if>
- <if test="guid != null">
- guid,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ts != null">
- #{ts,jdbcType=TIMESTAMP},
- </if>
- <if test="tslverId != null">
- #{tslverId,jdbcType=INTEGER},
- </if>
- <if test="line != null">
- #{line,jdbcType=VARCHAR},
- </if>
- <if test="val != null">
- #{val,jdbcType=VARCHAR},
- </if>
- <if test="msgId != null">
- #{msgId,jdbcType=VARCHAR},
- </if>
- <if test="rawTs != null">
- #{rawTs,jdbcType=TIMESTAMP},
- </if>
- <if test="guid != null">
- #{guid,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.tdengine.Devices">
- <!--@mbg.generated-->
- update devicesv2.devices
- <set>
- <if test="tslverId != null">
- tslver_id = #{tslverId,jdbcType=INTEGER},
- </if>
- <if test="line != null">
- line = #{line,jdbcType=VARCHAR},
- </if>
- <if test="val != null">
- val = #{val,jdbcType=VARCHAR},
- </if>
- <if test="msgId != null">
- msg_id = #{msgId,jdbcType=VARCHAR},
- </if>
- <if test="rawTs != null">
- raw_ts = #{rawTs,jdbcType=TIMESTAMP},
- </if>
- <if test="guid != null">
- guid = #{guid,jdbcType=VARCHAR},
- </if>
- </set>
- where ts = #{ts,jdbcType=TIMESTAMP}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.tdengine.Devices">
- <!--@mbg.generated-->
- update devicesv2.devices
- set tslver_id = #{tslverId,jdbcType=INTEGER},
- line = #{line,jdbcType=VARCHAR},
- val = #{val,jdbcType=VARCHAR},
- msg_id = #{msgId,jdbcType=VARCHAR},
- raw_ts = #{rawTs,jdbcType=TIMESTAMP},
- guid = #{guid,jdbcType=VARCHAR}
- where ts = #{ts,jdbcType=TIMESTAMP}
- </update>
- </mapper>
|