Skip to content

Commit c750c49

Browse files
committed
新增的代码。
1 parent 9b2bc0d commit c750c49

File tree

4 files changed

+953
-0
lines changed

4 files changed

+953
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
package com.isea533.mybatis.mapper;
2+
3+
import com.isea533.mybatis.model.Country2;
4+
import com.isea533.mybatis.model.Country2Example;
5+
import java.util.List;
6+
import org.apache.ibatis.annotations.Param;
7+
8+
public interface Country2Mapper {
9+
/**
10+
* This method was generated by MyBatis Generator.
11+
* This method corresponds to the database table country
12+
*
13+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
14+
*/
15+
int countByExample(Country2Example example);
16+
17+
/**
18+
* This method was generated by MyBatis Generator.
19+
* This method corresponds to the database table country
20+
*
21+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
22+
*/
23+
int deleteByExample(Country2Example example);
24+
25+
/**
26+
* This method was generated by MyBatis Generator.
27+
* This method corresponds to the database table country
28+
*
29+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
30+
*/
31+
int deleteByPrimaryKey(Integer id);
32+
33+
/**
34+
* This method was generated by MyBatis Generator.
35+
* This method corresponds to the database table country
36+
*
37+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
38+
*/
39+
int insert(Country2 record);
40+
41+
/**
42+
* This method was generated by MyBatis Generator.
43+
* This method corresponds to the database table country
44+
*
45+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
46+
*/
47+
int insertSelective(Country2 record);
48+
49+
/**
50+
* This method was generated by MyBatis Generator.
51+
* This method corresponds to the database table country
52+
*
53+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
54+
*/
55+
List<Country2> selectByExample(Country2Example example);
56+
57+
/**
58+
* This method was generated by MyBatis Generator.
59+
* This method corresponds to the database table country
60+
*
61+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
62+
*/
63+
Country2 selectByPrimaryKey(Integer id);
64+
65+
/**
66+
* This method was generated by MyBatis Generator.
67+
* This method corresponds to the database table country
68+
*
69+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
70+
*/
71+
int updateByExampleSelective(@Param("record") Country2 record, @Param("example") Country2Example example);
72+
73+
/**
74+
* This method was generated by MyBatis Generator.
75+
* This method corresponds to the database table country
76+
*
77+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
78+
*/
79+
int updateByExample(@Param("record") Country2 record, @Param("example") Country2Example example);
80+
81+
/**
82+
* This method was generated by MyBatis Generator.
83+
* This method corresponds to the database table country
84+
*
85+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
86+
*/
87+
int updateByPrimaryKeySelective(Country2 record);
88+
89+
/**
90+
* This method was generated by MyBatis Generator.
91+
* This method corresponds to the database table country
92+
*
93+
* @mbggenerated Mon Dec 08 11:25:39 CST 2014
94+
*/
95+
int updateByPrimaryKey(Country2 record);
96+
}
Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3+
<mapper namespace="com.isea533.mybatis.mapper.Country2Mapper" >
4+
<resultMap id="BaseResultMap" type="com.isea533.mybatis.model.Country2" >
5+
<!--
6+
WARNING - @mbggenerated
7+
This element is automatically generated by MyBatis Generator, do not modify.
8+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
9+
-->
10+
<id column="id" property="id" jdbcType="INTEGER" />
11+
<result column="countryname" property="countryname" jdbcType="VARCHAR" />
12+
<result column="countrycode" property="countrycode" jdbcType="VARCHAR" />
13+
</resultMap>
14+
<sql id="Example_Where_Clause" >
15+
<!--
16+
WARNING - @mbggenerated
17+
This element is automatically generated by MyBatis Generator, do not modify.
18+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
19+
-->
20+
<where >
21+
<foreach collection="oredCriteria" item="criteria" separator="or" >
22+
<if test="criteria.valid" >
23+
<trim prefix="(" suffix=")" prefixOverrides="and" >
24+
<foreach collection="criteria.criteria" item="criterion" >
25+
<choose >
26+
<when test="criterion.noValue" >
27+
and ${criterion.condition}
28+
</when>
29+
<when test="criterion.singleValue" >
30+
and ${criterion.condition} #{criterion.value}
31+
</when>
32+
<when test="criterion.betweenValue" >
33+
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34+
</when>
35+
<when test="criterion.listValue" >
36+
and ${criterion.condition}
37+
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38+
#{listItem}
39+
</foreach>
40+
</when>
41+
</choose>
42+
</foreach>
43+
</trim>
44+
</if>
45+
</foreach>
46+
</where>
47+
</sql>
48+
<sql id="Update_By_Example_Where_Clause" >
49+
<!--
50+
WARNING - @mbggenerated
51+
This element is automatically generated by MyBatis Generator, do not modify.
52+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
53+
-->
54+
<where >
55+
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
56+
<if test="criteria.valid" >
57+
<trim prefix="(" suffix=")" prefixOverrides="and" >
58+
<foreach collection="criteria.criteria" item="criterion" >
59+
<choose >
60+
<when test="criterion.noValue" >
61+
and ${criterion.condition}
62+
</when>
63+
<when test="criterion.singleValue" >
64+
and ${criterion.condition} #{criterion.value}
65+
</when>
66+
<when test="criterion.betweenValue" >
67+
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
68+
</when>
69+
<when test="criterion.listValue" >
70+
and ${criterion.condition}
71+
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
72+
#{listItem}
73+
</foreach>
74+
</when>
75+
</choose>
76+
</foreach>
77+
</trim>
78+
</if>
79+
</foreach>
80+
</where>
81+
</sql>
82+
<sql id="Base_Column_List" >
83+
<!--
84+
WARNING - @mbggenerated
85+
This element is automatically generated by MyBatis Generator, do not modify.
86+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
87+
-->
88+
id, countryname, countrycode
89+
</sql>
90+
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.isea533.mybatis.model.Country2Example" >
91+
<!--
92+
WARNING - @mbggenerated
93+
This element is automatically generated by MyBatis Generator, do not modify.
94+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
95+
-->
96+
select
97+
<if test="distinct" >
98+
distinct
99+
</if>
100+
<include refid="Base_Column_List" />
101+
from country
102+
<if test="_parameter != null" >
103+
<include refid="Example_Where_Clause" />
104+
</if>
105+
<if test="orderByClause != null" >
106+
order by ${orderByClause}
107+
</if>
108+
</select>
109+
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
110+
<!--
111+
WARNING - @mbggenerated
112+
This element is automatically generated by MyBatis Generator, do not modify.
113+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
114+
-->
115+
select
116+
<include refid="Base_Column_List" />
117+
from country
118+
where id = #{id,jdbcType=INTEGER}
119+
</select>
120+
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
121+
<!--
122+
WARNING - @mbggenerated
123+
This element is automatically generated by MyBatis Generator, do not modify.
124+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
125+
-->
126+
delete from country
127+
where id = #{id,jdbcType=INTEGER}
128+
</delete>
129+
<delete id="deleteByExample" parameterType="com.isea533.mybatis.model.Country2Example" >
130+
<!--
131+
WARNING - @mbggenerated
132+
This element is automatically generated by MyBatis Generator, do not modify.
133+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
134+
-->
135+
delete from country
136+
<if test="_parameter != null" >
137+
<include refid="Example_Where_Clause" />
138+
</if>
139+
</delete>
140+
<insert id="insert" parameterType="com.isea533.mybatis.model.Country2" >
141+
<!--
142+
WARNING - @mbggenerated
143+
This element is automatically generated by MyBatis Generator, do not modify.
144+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
145+
-->
146+
insert into country (id, countryname, countrycode
147+
)
148+
values (#{id,jdbcType=INTEGER}, #{countryname,jdbcType=VARCHAR}, #{countrycode,jdbcType=VARCHAR}
149+
)
150+
</insert>
151+
<insert id="insertSelective" parameterType="com.isea533.mybatis.model.Country2" >
152+
<!--
153+
WARNING - @mbggenerated
154+
This element is automatically generated by MyBatis Generator, do not modify.
155+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
156+
-->
157+
insert into country
158+
<trim prefix="(" suffix=")" suffixOverrides="," >
159+
<if test="id != null" >
160+
id,
161+
</if>
162+
<if test="countryname != null" >
163+
countryname,
164+
</if>
165+
<if test="countrycode != null" >
166+
countrycode,
167+
</if>
168+
</trim>
169+
<trim prefix="values (" suffix=")" suffixOverrides="," >
170+
<if test="id != null" >
171+
#{id,jdbcType=INTEGER},
172+
</if>
173+
<if test="countryname != null" >
174+
#{countryname,jdbcType=VARCHAR},
175+
</if>
176+
<if test="countrycode != null" >
177+
#{countrycode,jdbcType=VARCHAR},
178+
</if>
179+
</trim>
180+
</insert>
181+
<select id="countByExample" parameterType="com.isea533.mybatis.model.Country2Example" resultType="java.lang.Integer" >
182+
<!--
183+
WARNING - @mbggenerated
184+
This element is automatically generated by MyBatis Generator, do not modify.
185+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
186+
-->
187+
select count(*) from country
188+
<if test="_parameter != null" >
189+
<include refid="Example_Where_Clause" />
190+
</if>
191+
</select>
192+
<update id="updateByExampleSelective" parameterType="map" >
193+
<!--
194+
WARNING - @mbggenerated
195+
This element is automatically generated by MyBatis Generator, do not modify.
196+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
197+
-->
198+
update country
199+
<set >
200+
<if test="record.id != null" >
201+
id = #{record.id,jdbcType=INTEGER},
202+
</if>
203+
<if test="record.countryname != null" >
204+
countryname = #{record.countryname,jdbcType=VARCHAR},
205+
</if>
206+
<if test="record.countrycode != null" >
207+
countrycode = #{record.countrycode,jdbcType=VARCHAR},
208+
</if>
209+
</set>
210+
<if test="_parameter != null" >
211+
<include refid="Update_By_Example_Where_Clause" />
212+
</if>
213+
</update>
214+
<update id="updateByExample" parameterType="map" >
215+
<!--
216+
WARNING - @mbggenerated
217+
This element is automatically generated by MyBatis Generator, do not modify.
218+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
219+
-->
220+
update country
221+
set id = #{record.id,jdbcType=INTEGER},
222+
countryname = #{record.countryname,jdbcType=VARCHAR},
223+
countrycode = #{record.countrycode,jdbcType=VARCHAR}
224+
<if test="_parameter != null" >
225+
<include refid="Update_By_Example_Where_Clause" />
226+
</if>
227+
</update>
228+
<update id="updateByPrimaryKeySelective" parameterType="com.isea533.mybatis.model.Country2" >
229+
<!--
230+
WARNING - @mbggenerated
231+
This element is automatically generated by MyBatis Generator, do not modify.
232+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
233+
-->
234+
update country
235+
<set >
236+
<if test="countryname != null" >
237+
countryname = #{countryname,jdbcType=VARCHAR},
238+
</if>
239+
<if test="countrycode != null" >
240+
countrycode = #{countrycode,jdbcType=VARCHAR},
241+
</if>
242+
</set>
243+
where id = #{id,jdbcType=INTEGER}
244+
</update>
245+
<update id="updateByPrimaryKey" parameterType="com.isea533.mybatis.model.Country2" >
246+
<!--
247+
WARNING - @mbggenerated
248+
This element is automatically generated by MyBatis Generator, do not modify.
249+
This element was generated on Mon Dec 08 11:25:39 CST 2014.
250+
-->
251+
update country
252+
set countryname = #{countryname,jdbcType=VARCHAR},
253+
countrycode = #{countrycode,jdbcType=VARCHAR}
254+
where id = #{id,jdbcType=INTEGER}
255+
</update>
256+
</mapper>

0 commit comments

Comments
 (0)