KeyInfoMapper.xml
5.88 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?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.key.info.KeyInfoMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.key.info.KeyInfo">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="del_flag" jdbcType="BIT" property="delFlag"/>
<result column="create_By" jdbcType="INTEGER" property="createBy"/>
<result column="create_Time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="updateBy" jdbcType="INTEGER" property="updateby"/>
<result column="update_Time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="yard_Id" jdbcType="INTEGER" property="yardId"/>
<result column="device_id" jdbcType="INTEGER" property="deviceId"/>
<result column="cabinetNo" jdbcType="INTEGER" property="cabinetno"/>
<result column="plate_Num" jdbcType="VARCHAR" property="plateNum"/>
</resultMap>
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
parameterType="com.ruoyi.domain.key.info.KeyInfo">
INSERT INTO key_info <include refid="insertSelectiveColumn"></include>
<include refid="insertSelectiveValue"></include>
</insert>
<sql id="columns">
id
, name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo , plate_Num
</sql>
<sql id="insert_columns">
id
, name , status , del_flag , create_By , create_Time , updateBy , update_Time , yard_Id , device_id , cabinetNo , plate_Num
</sql>
<sql id="insert_values">
#{id}
,
#{name},
#{status},
#{delFlag},
#{createBy},
#{createTime},
#{updateby},
#{updateTime},
#{yardId},
#{deviceId},
#{cabinetno},
#{plateNum}
</sql>
<sql id="insertSelectiveColumn">
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null!=id">id,</if>
<if test="null!=name">name,</if>
<if test="null!=status">status,</if>
<if test="null!=delFlag">del_flag,</if>
<if test="null!=createBy">create_By,</if>
<if test="null!=createTime">create_Time,</if>
<if test="null!=updateby">updateBy,</if>
<if test="null!=updateTime">update_Time,</if>
<if test="null!=yardId">yard_Id,</if>
<if test="null!=deviceId">device_id,</if>
<if test="null!=cabinetno">cabinetNo,</if>
<if test="null!=plateNum">plate_Num,</if>
</trim>
</sql>
<sql id="insertSelectiveValue">
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null!=id">#{id,jdbcType=INTEGER},</if>
<if test="null!=name">#{name,jdbcType=VARCHAR},</if>
<if test="null!=status">#{status,jdbcType=INTEGER},</if>
<if test="null!=delFlag">#{delFlag,jdbcType=BIT},</if>
<if test="null!=createBy">#{createBy,jdbcType=INTEGER},</if>
<if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateby">#{updateby,jdbcType=INTEGER},</if>
<if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=yardId">#{yardId,jdbcType=INTEGER},</if>
<if test="null!=deviceId">#{deviceId,jdbcType=INTEGER},</if>
<if test="null!=cabinetno">#{cabinetno,jdbcType=INTEGER},</if>
<if test="null!=plateNum">#{plateNum,jdbcType=VARCHAR},</if>
</trim>
</sql>
<sql id="updateByPrimaryKeySelectiveSql">
<set>
<if test="null!=id">id = #{id,jdbcType=INTEGER},</if>
<if test="null!=name">name = #{name,jdbcType=VARCHAR},</if>
<if test="null!=status">status = #{status,jdbcType=INTEGER},</if>
<if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if>
<if test="null!=createBy">create_By = #{createBy,jdbcType=INTEGER},</if>
<if test="null!=createTime">create_Time = #{createTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateby">updateBy = #{updateby,jdbcType=INTEGER},</if>
<if test="null!=updateTime">update_Time = #{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=yardId">yard_Id = #{yardId,jdbcType=INTEGER},</if>
<if test="null!=deviceId">device_id = #{deviceId,jdbcType=INTEGER},</if>
<if test="null!=cabinetno">cabinetNo = #{cabinetno,jdbcType=INTEGER},</if>
<if test="null!=plateNum">plate_Num = #{plateNum,jdbcType=VARCHAR},</if>
</set>
</sql>
<sql id="where">
<if test="null!=id">AND id = #{id,jdbcType=INTEGER},</if>
<if test="null!=name">AND name = #{name,jdbcType=VARCHAR},</if>
<if test="null!=status">AND status = #{status,jdbcType=INTEGER},</if>
<if test="null!=delFlag">AND del_flag = #{delFlag,jdbcType=BIT},</if>
<if test="null!=createBy">AND create_By = #{createBy,jdbcType=INTEGER},</if>
<if test="null!=createTime">AND create_Time = #{createTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateby">AND updateBy = #{updateby,jdbcType=INTEGER},</if>
<if test="null!=updateTime">AND update_Time = #{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=yardId">AND yard_Id = #{yardId,jdbcType=INTEGER},</if>
<if test="null!=deviceId">AND device_id = #{deviceId,jdbcType=INTEGER},</if>
<if test="null!=cabinetno">AND cabinetNo = #{cabinetno,jdbcType=INTEGER},</if>
<if test="null!=plateNum">AND plate_Num = #{plateNum,jdbcType=VARCHAR},</if>
</sql>
</mapper>