| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <?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.goafanti.common.dao.CountryCodeMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.CountryCode">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- <id column="country_name_en" jdbcType="VARCHAR" property="countryNameEn" />
- <result column="country_name_zh" jdbcType="VARCHAR" property="countryNameZh" />
- <result column="region_code" jdbcType="CHAR" property="regionCode" />
- <result column="tel_code" jdbcType="INTEGER" property="telCode" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- country_name_en, country_name_zh, region_code, tel_code
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.CountryCodeExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from country_code
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- select
- <include refid="Base_Column_List" />
- from country_code
- where country_name_en = #{countryNameEn,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- delete from country_code
- where country_name_en = #{countryNameEn,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.CountryCodeExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- delete from country_code
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.CountryCode">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- insert into country_code (country_name_en, country_name_zh, region_code,
- tel_code)
- values (#{countryNameEn,jdbcType=VARCHAR}, #{countryNameZh,jdbcType=VARCHAR}, #{regionCode,jdbcType=CHAR},
- #{telCode,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.CountryCode">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- insert into country_code
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="countryNameEn != null">
- country_name_en,
- </if>
- <if test="countryNameZh != null">
- country_name_zh,
- </if>
- <if test="regionCode != null">
- region_code,
- </if>
- <if test="telCode != null">
- tel_code,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="countryNameEn != null">
- #{countryNameEn,jdbcType=VARCHAR},
- </if>
- <if test="countryNameZh != null">
- #{countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="regionCode != null">
- #{regionCode,jdbcType=CHAR},
- </if>
- <if test="telCode != null">
- #{telCode,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.CountryCodeExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- select count(*) from country_code
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- update country_code
- <set>
- <if test="record.countryNameEn != null">
- country_name_en = #{record.countryNameEn,jdbcType=VARCHAR},
- </if>
- <if test="record.countryNameZh != null">
- country_name_zh = #{record.countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="record.regionCode != null">
- region_code = #{record.regionCode,jdbcType=CHAR},
- </if>
- <if test="record.telCode != null">
- tel_code = #{record.telCode,jdbcType=INTEGER},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- update country_code
- set country_name_en = #{record.countryNameEn,jdbcType=VARCHAR},
- country_name_zh = #{record.countryNameZh,jdbcType=VARCHAR},
- region_code = #{record.regionCode,jdbcType=CHAR},
- tel_code = #{record.telCode,jdbcType=INTEGER}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CountryCode">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- update country_code
- <set>
- <if test="countryNameZh != null">
- country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="regionCode != null">
- region_code = #{regionCode,jdbcType=CHAR},
- </if>
- <if test="telCode != null">
- tel_code = #{telCode,jdbcType=INTEGER},
- </if>
- </set>
- where country_name_en = #{countryNameEn,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CountryCode">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Jul 21 08:55:01 CST 2017.
- -->
- update country_code
- set country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
- region_code = #{regionCode,jdbcType=CHAR},
- tel_code = #{telCode,jdbcType=INTEGER}
- where country_name_en = #{countryNameEn,jdbcType=VARCHAR}
- </update>
- </mapper>
|