AppYearMemberBillMapper.xml
5.87 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?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.yoho.activity.dal.AppYearMemberBillMapper" >
<resultMap id="BaseResultMap" type="com.yoho.activity.dal.model.AppYearMemberBill" >
<id column="uid" property="uid" jdbcType="INTEGER" />
<result column="order_num" property="orderNum" jdbcType="INTEGER" />
<result column="buy_num" property="buyNum" jdbcType="INTEGER" />
<result column="order_amount" property="orderAmount" jdbcType="INTEGER" />
<result column="kilo" property="kilo" jdbcType="INTEGER" />
<result column="score" property="score" jdbcType="INTEGER" />
<result column="beat" property="beat" jdbcType="INTEGER" />
<result column="nickname" property="nickname" jdbcType="VARCHAR" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
<result column="year" property="year" jdbcType="VARCHAR" />
<result column="email" property="email" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
uid, order_num, buy_num, order_amount, kilo, score, beat, nickname, phone, year,email
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from app_year_member_bill
where uid = #{uid,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from app_year_member_bill
where uid = #{uid,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.activity.dal.model.AppYearMemberBill" >
insert into app_year_member_bill (uid, order_num, buy_num,
order_amount, kilo, score,
beat, nickname, phone,
year,email)
values (#{uid,jdbcType=INTEGER}, #{orderNum,jdbcType=INTEGER}, #{buyNum,jdbcType=INTEGER},
#{orderAmount,jdbcType=INTEGER}, #{kilo,jdbcType=INTEGER}, #{score,jdbcType=INTEGER},
#{beat,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{year,jdbcType=VARCHAR},#{email,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.yoho.activity.dal.model.AppYearMemberBill" >
insert into app_year_member_bill
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="uid != null" >
uid,
</if>
<if test="orderNum != null" >
order_num,
</if>
<if test="buyNum != null" >
buy_num,
</if>
<if test="orderAmount != null" >
order_amount,
</if>
<if test="kilo != null" >
kilo,
</if>
<if test="score != null" >
score,
</if>
<if test="beat != null" >
beat,
</if>
<if test="nickname != null" >
nickname,
</if>
<if test="phone != null" >
phone,
</if>
<if test="year != null" >
year,
</if>
<if test="email != null" >
email,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="uid != null" >
#{uid,jdbcType=INTEGER},
</if>
<if test="orderNum != null" >
#{orderNum,jdbcType=INTEGER},
</if>
<if test="buyNum != null" >
#{buyNum,jdbcType=INTEGER},
</if>
<if test="orderAmount != null" >
#{orderAmount,jdbcType=INTEGER},
</if>
<if test="kilo != null" >
#{kilo,jdbcType=INTEGER},
</if>
<if test="score != null" >
#{score,jdbcType=INTEGER},
</if>
<if test="beat != null" >
#{beat,jdbcType=INTEGER},
</if>
<if test="nickname != null" >
#{nickname,jdbcType=VARCHAR},
</if>
<if test="phone != null" >
#{phone,jdbcType=VARCHAR},
</if>
<if test="year != null" >
#{year,jdbcType=VARCHAR},
</if>
<if test="email != null" >
#{email,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.activity.dal.model.AppYearMemberBill" >
update app_year_member_bill
<set >
<if test="orderNum != null" >
order_num = #{orderNum,jdbcType=INTEGER},
</if>
<if test="buyNum != null" >
buy_num = #{buyNum,jdbcType=INTEGER},
</if>
<if test="orderAmount != null" >
order_amount = #{orderAmount,jdbcType=INTEGER},
</if>
<if test="kilo != null" >
kilo = #{kilo,jdbcType=INTEGER},
</if>
<if test="score != null" >
score = #{score,jdbcType=INTEGER},
</if>
<if test="beat != null" >
beat = #{beat,jdbcType=INTEGER},
</if>
<if test="nickname != null" >
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="phone != null" >
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="year != null" >
year = #{year,jdbcType=VARCHAR},
</if>
<if test="email != null" >
email = #{email,jdbcType=VARCHAR},
</if>
</set>
where uid = #{uid,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yoho.activity.dal.model.AppYearMemberBill" >
update app_year_member_bill
set order_num = #{orderNum,jdbcType=INTEGER},
buy_num = #{buyNum,jdbcType=INTEGER},
order_amount = #{orderAmount,jdbcType=INTEGER},
kilo = #{kilo,jdbcType=INTEGER},
score = #{score,jdbcType=INTEGER},
beat = #{beat,jdbcType=INTEGER},
nickname = #{nickname,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
year = #{year,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR}
where uid = #{uid,jdbcType=INTEGER}
</update>
<select id="selectByUidAndYear" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from app_year_member_bill
where uid = #{uid,jdbcType=INTEGER} and year = #{year,jdbcType=VARCHAR} limit 1
</select>
</mapper>