kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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.nanometer.smartlab.dao.TempSensorsDao">
  <resultMap id="BaseResultMap" type="com.nanometer.smartlab.entity.TempSensors">
      <id property="id" column="id"/>
      <id column="id" jdbcType="VARCHAR" property="id" />
      <result column="container_id" jdbcType="VARCHAR" property="containerId" />
      <result column="warehouse_container_name" jdbcType="VARCHAR" property="warehouseContainerName" />
      <result column="laboratory_container_name" jdbcType="VARCHAR" property="laboratoryContainerName" />
      <result column="temp" jdbcType="DOUBLE" property="temp" />
      <result column="humidity" jdbcType="INTEGER" property="humidity" />
      <result column="voc1" jdbcType="INTEGER" property="voc1" />
      <result column="flag" jdbcType="INTEGER" property="flag" />
      <result column="type" jdbcType="TINYINT" property="type" />
      <result column="laboratory_name" jdbcType="VARCHAR" property="laboratoryName" />
      <result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName" />
      <result column="laboratory_id" jdbcType="VARCHAR" property="laboratoryId" />
      <result column="warehouse_id" jdbcType="VARCHAR" property="warehouseId" />
      <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
 
    <insert id="insertWatning" parameterType="com.nanometer.smartlab.entity.TempSensors">
        insert into sys_container_sensors
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="containerId != null">
                container_id,
            </if>
            <if test="temp != null">
                temp,
            </if>
            <if test="humidity != null">
                humidity,
            </if>
            <if test="voc1 != null">
                voc1,
            </if>
            <if test="flag != null">
                flag,
            </if>
            <if test="type != null">
                type,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="containerId != null">
                #{containerId,jdbcType=VARCHAR},
            </if>
            <if test="temp != null">
                #{temp,jdbcType=DOUBLE},
            </if>
            <if test="humidity != null">
                #{humidity,jdbcType=INTEGER},
            </if>
            <if test="voc1 != null">
                #{voc1,jdbcType=INTEGER},
            </if>
            <if test="flag != null">
                #{flag,jdbcType=INTEGER},
            </if>
            <if test="type != null">
                #{type,jdbcType=BIT},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
 
 
</mapper>