InformWaterMapper.xml
2.1 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
<?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.InformWaterMapper" >
<resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.InformWater" >
<result column="inform_money" property="informMoney" jdbcType="VARCHAR" />
<result column="inform_phone" property="informPhone" jdbcType="VARCHAR" />
<result column="room_name" property="roomName" jdbcType="VARCHAR" />
<result column="wm_id" property="wmId" jdbcType="VARCHAR" />
<result column="id" property="id" jdbcType="INTEGER" />
</resultMap>
<select id="selectAll" resultMap="BaseResultMap">
select * from inform_water
</select>
<insert id="insert" parameterType="com.sunyo.energy.location.model.InformWater" >
insert into inform_water (inform_money, inform_phone, room_name,
wm_id, id)
values (#{informMoney,jdbcType=VARCHAR}, #{informPhone,jdbcType=VARCHAR}, #{roomName,jdbcType=VARCHAR},
#{wmId,jdbcType=VARCHAR}, #{id,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.energy.location.model.InformWater" >
insert into inform_water
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="informMoney != null" >
inform_money,
</if>
<if test="informPhone != null" >
inform_phone,
</if>
<if test="roomName != null" >
room_name,
</if>
<if test="wmId != null" >
wm_id,
</if>
<if test="id != null" >
id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="informMoney != null" >
#{informMoney,jdbcType=VARCHAR},
</if>
<if test="informPhone != null" >
#{informPhone,jdbcType=VARCHAR},
</if>
<if test="roomName != null" >
#{roomName,jdbcType=VARCHAR},
</if>
<if test="wmId != null" >
#{wmId,jdbcType=VARCHAR},
</if>
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
</trim>
</insert>
</mapper>