LingangEquipmentHeartbeatMapper.xml
4.71 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?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.ruoyi.mapper.equipment.heartbeat.LingangEquipmentHeartbeatMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.equipment.heartbeat.LingangEquipmentHeartbeat">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="device" jdbcType="VARCHAR" property="device"/>
<result column="time" jdbcType="TIMESTAMP" property="time"/>
<result column="alarm" jdbcType="INTEGER" property="alarm"/>
<result column="exKeys" jdbcType="VARCHAR" property="exkeys"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="updateBy" jdbcType="VARCHAR" property="updateby"/>
</resultMap>
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
parameterType="com.ruoyi.domain.equipment.heartbeat.LingangEquipmentHeartbeat">
INSERT INTO equipment_heartbeat
<include refid="insertSelectiveColumn"></include>
<include refid="insertSelectiveValue"></include>
</insert>
<sql id="columns">
id
, device , time , alarm , exKeys , create_time , create_by , update_time , updateBy
</sql>
<sql id="insert_columns">
id
, device , time , alarm , exKeys , create_time , create_by , update_time , updateBy
</sql>
<sql id="insert_values">
#{id}
,
#{device},
#{time},
#{alarm},
#{exkeys},
#{createTime},
#{createBy},
#{updateTime},
#{updateby}
</sql>
<sql id="insertSelectiveColumn">
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null!=id">id,</if>
<if test="null!=device">device,</if>
<if test="null!=time">time,</if>
<if test="null!=alarm">alarm,</if>
<if test="null!=exkeys">exKeys,</if>
<if test="null!=createTime">create_time,</if>
<if test="null!=createBy">create_by,</if>
<if test="null!=updateTime">update_time,</if>
<if test="null!=updateby">updateBy,</if>
</trim>
</sql>
<sql id="insertSelectiveValue">
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null!=id">#{id,jdbcType=BIGINT},</if>
<if test="null!=device">#{device,jdbcType=VARCHAR},</if>
<if test="null!=time">#{time,jdbcType=TIMESTAMP},</if>
<if test="null!=alarm">#{alarm,jdbcType=INTEGER},</if>
<if test="null!=exkeys">#{exkeys,jdbcType=VARCHAR},</if>
<if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if>
<if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateby">#{updateby,jdbcType=VARCHAR},</if>
</trim>
</sql>
<sql id="updateByPrimaryKeySelectiveSql">
<set>
<if test="null!=id">id = #{id,jdbcType=BIGINT},</if>
<if test="null!=device">device = #{device,jdbcType=VARCHAR},</if>
<if test="null!=time">time = #{time,jdbcType=TIMESTAMP},</if>
<if test="null!=alarm">alarm = #{alarm,jdbcType=INTEGER},</if>
<if test="null!=exkeys">exKeys = #{exkeys,jdbcType=VARCHAR},</if>
<if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
<if test="null!=createBy">create_by = #{createBy,jdbcType=VARCHAR},</if>
<if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateby">updateBy = #{updateby,jdbcType=VARCHAR},</if>
</set>
</sql>
<sql id="where">
<if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if>
<if test="null!=device">AND device = #{device,jdbcType=VARCHAR},</if>
<if test="null!=time">AND time = #{time,jdbcType=TIMESTAMP},</if>
<if test="null!=alarm">AND alarm = #{alarm,jdbcType=INTEGER},</if>
<if test="null!=exkeys">AND exKeys = #{exkeys,jdbcType=VARCHAR},</if>
<if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if>
<if test="null!=createBy">AND create_by = #{createBy,jdbcType=VARCHAR},</if>
<if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateby">AND updateBy = #{updateby,jdbcType=VARCHAR},</if>
</sql>
</mapper>