AreaRegionMapper.xml 8.87 KB
Newer Older
1 2 3
<?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="pwc.taxtech.atms.dao.AreaRegionMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.AreaRegion">
5 6 7 8
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
9 10 11
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="area_id" jdbcType="VARCHAR" property="areaId" />
    <result column="region_id" jdbcType="VARCHAR" property="regionId" />
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
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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>
40
            </foreach>
41
          </trim>
42
        </if>
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
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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>
75
        </if>
76 77 78 79 80 81 82 83
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
84
    id, area_id, region_id
85
  </sql>
86
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.AreaRegionExample" resultMap="BaseResultMap">
87 88 89 90 91 92 93 94 95
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
96
    from area_region
97 98 99 100 101 102 103
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
gary's avatar
gary committed
104
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
105 106 107 108 109 110
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
gary's avatar
gary committed
111 112
    from area_region
    where id = #{id,jdbcType=VARCHAR}
113
  </select>
gary's avatar
gary committed
114
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
115 116 117 118
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
119 120
    delete from area_region
    where id = #{id,jdbcType=VARCHAR}
121
  </delete>
122
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.AreaRegionExample">
123 124 125 126
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
127
    delete from area_region
128 129 130 131
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
132
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.AreaRegion">
133 134 135 136
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
137
    insert into area_region (id, area_id, region_id
138
      )
gary's avatar
gary committed
139
    values (#{id,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, #{regionId,jdbcType=VARCHAR}
140 141
      )
  </insert>
142
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.AreaRegion">
143 144 145 146
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
147
    insert into area_region
148
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
149 150
      <if test="id != null">
        id,
151
      </if>
gary's avatar
gary committed
152 153
      <if test="areaId != null">
        area_id,
154
      </if>
gary's avatar
gary committed
155 156
      <if test="regionId != null">
        region_id,
157 158 159
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
160 161
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
162
      </if>
gary's avatar
gary committed
163 164
      <if test="areaId != null">
        #{areaId,jdbcType=VARCHAR},
165
      </if>
gary's avatar
gary committed
166 167
      <if test="regionId != null">
        #{regionId,jdbcType=VARCHAR},
168 169 170
      </if>
    </trim>
  </insert>
171
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.AreaRegionExample" resultType="java.lang.Long">
172 173 174 175
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
176
    select count(*) from area_region
177 178 179 180 181 182 183 184 185
    <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.
    -->
gary's avatar
gary committed
186
    update area_region
187
    <set>
gary's avatar
gary committed
188 189
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
190
      </if>
gary's avatar
gary committed
191 192
      <if test="record.areaId != null">
        area_id = #{record.areaId,jdbcType=VARCHAR},
193
      </if>
gary's avatar
gary committed
194 195
      <if test="record.regionId != null">
        region_id = #{record.regionId,jdbcType=VARCHAR},
196 197 198 199 200 201 202 203 204 205 206
      </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.
    -->
gary's avatar
gary committed
207 208 209 210
    update area_region
    set id = #{record.id,jdbcType=VARCHAR},
      area_id = #{record.areaId,jdbcType=VARCHAR},
      region_id = #{record.regionId,jdbcType=VARCHAR}
211 212 213 214
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
215
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.AreaRegion">
216 217 218 219
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
220
    update area_region
221
    <set>
gary's avatar
gary committed
222 223
      <if test="areaId != null">
        area_id = #{areaId,jdbcType=VARCHAR},
224
      </if>
gary's avatar
gary committed
225 226
      <if test="regionId != null">
        region_id = #{regionId,jdbcType=VARCHAR},
227 228
      </if>
    </set>
gary's avatar
gary committed
229
    where id = #{id,jdbcType=VARCHAR}
230
  </update>
231
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.AreaRegion">
232 233 234 235
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
236 237 238 239
    update area_region
    set area_id = #{areaId,jdbcType=VARCHAR},
      region_id = #{regionId,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
240
  </update>
241
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.AreaRegionExample" resultMap="BaseResultMap">
242 243 244 245 246 247 248 249 250
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
251
    from area_region
252 253 254 255 256 257 258
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
259
</mapper>