NoteInformMapper.xml
4.8 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
117
118
119
120
121
122
123
124
125
126
127
128
129
<?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.sunyo.energy.location.dao.NoteInformMapper" >
<resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.NoteInform" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="room_name" property="roomName" jdbcType="VARCHAR" />
<result column="water_ele_type" property="waterEleType" jdbcType="VARCHAR" />
<result column="inform_money" property="informMoney" jdbcType="VARCHAR" />
<result column="inform_status" property="informStatus" jdbcType="VARCHAR" />
<result column="inform_phone" property="informPhone" jdbcType="VARCHAR" />
<result column="inform_date" property="informDate" jdbcType="TIMESTAMP" />
<result column="status" property="status" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, room_name, water_ele_type, inform_money, inform_status, inform_phone, inform_date,
status
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from note_inform
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from note_inform
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.sunyo.energy.location.model.NoteInform" >
insert into note_inform (id, room_name, water_ele_type,
inform_money, inform_status, inform_phone,
inform_date, status)
values (#{id,jdbcType=INTEGER}, #{roomName,jdbcType=VARCHAR}, #{waterEleType,jdbcType=VARCHAR},
#{informMoney,jdbcType=VARCHAR}, #{informStatus,jdbcType=VARCHAR}, #{informPhone,jdbcType=VARCHAR},
#{informDate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.energy.location.model.NoteInform" >
insert into note_inform
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="roomName != null" >
room_name,
</if>
<if test="waterEleType != null" >
water_ele_type,
</if>
<if test="informMoney != null" >
inform_money,
</if>
<if test="informStatus != null" >
inform_status,
</if>
<if test="informPhone != null" >
inform_phone,
</if>
<if test="informDate != null" >
inform_date,
</if>
<if test="status != null" >
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="roomName != null" >
#{roomName,jdbcType=VARCHAR},
</if>
<if test="waterEleType != null" >
#{waterEleType,jdbcType=VARCHAR},
</if>
<if test="informMoney != null" >
#{informMoney,jdbcType=VARCHAR},
</if>
<if test="informStatus != null" >
#{informStatus,jdbcType=VARCHAR},
</if>
<if test="informPhone != null" >
#{informPhone,jdbcType=VARCHAR},
</if>
<if test="informDate != null" >
#{informDate,jdbcType=TIMESTAMP},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.NoteInform" >
update note_inform
<set >
<if test="roomName != null" >
room_name = #{roomName,jdbcType=VARCHAR},
</if>
<if test="waterEleType != null" >
water_ele_type = #{waterEleType,jdbcType=VARCHAR},
</if>
<if test="informMoney != null" >
inform_money = #{informMoney,jdbcType=VARCHAR},
</if>
<if test="informStatus != null" >
inform_status = #{informStatus,jdbcType=VARCHAR},
</if>
<if test="informPhone != null" >
inform_phone = #{informPhone,jdbcType=VARCHAR},
</if>
<if test="informDate != null" >
inform_date = #{informDate,jdbcType=TIMESTAMP},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.NoteInform" >
update note_inform
set room_name = #{roomName,jdbcType=VARCHAR},
water_ele_type = #{waterEleType,jdbcType=VARCHAR},
inform_money = #{informMoney,jdbcType=VARCHAR},
inform_status = #{informStatus,jdbcType=VARCHAR},
inform_phone = #{informPhone,jdbcType=VARCHAR},
inform_date = #{informDate,jdbcType=TIMESTAMP},
status = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>