StandardAccountMapper.xml 15.3 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.StandardAccountMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.StandardAccount">
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 12 13 14 15 16 17 18 19 20 21 22
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="parent_code" jdbcType="VARCHAR" property="parentCode" />
    <result column="full_name" jdbcType="VARCHAR" property="fullName" />
    <result column="acct_prop" jdbcType="INTEGER" property="acctProp" />
    <result column="sub_prop" jdbcType="INTEGER" property="subProp" />
    <result column="acct_level" jdbcType="INTEGER" property="acctLevel" />
    <result column="direction" jdbcType="INTEGER" property="direction" />
    <result column="is_leaf" jdbcType="BIT" property="isLeaf" />
    <result column="rule_type" jdbcType="INTEGER" property="ruleType" />
    <result column="is_active" jdbcType="BIT" property="isActive" />
    <result column="english_name" jdbcType="VARCHAR" property="englishName" />
    <result column="industry_id" jdbcType="VARCHAR" property="industryId" />
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
  </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>
51
            </foreach>
52
          </trim>
53
        </if>
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
      </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>
86
        </if>
87 88 89 90 91 92 93 94
      </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
95 96
    id, code, name, parent_code, full_name, acct_prop, sub_prop, acct_level, direction, 
    is_leaf, rule_type, is_active, english_name, industry_id
97
  </sql>
98
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.StandardAccountExample" resultMap="BaseResultMap">
99 100 101 102 103 104 105 106 107
    <!--
      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
108
    from standard_account
109 110 111 112 113 114 115 116 117 118 119 120 121 122
    <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.
    -->
    select 
    <include refid="Base_Column_List" />
gary's avatar
gary committed
123 124
    from standard_account
    where id = #{id,jdbcType=VARCHAR}
125 126 127 128 129 130
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
131 132
    delete from standard_account
    where id = #{id,jdbcType=VARCHAR}
133
  </delete>
134
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.StandardAccountExample">
135 136 137 138
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
139
    delete from standard_account
140 141 142 143
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
144
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.StandardAccount">
145 146 147 148
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
149 150 151 152 153
    insert into standard_account (id, code, name, 
      parent_code, full_name, acct_prop, 
      sub_prop, acct_level, direction, 
      is_leaf, rule_type, is_active, 
      english_name, industry_id)
neo's avatar
neo committed
154
    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
gary's avatar
gary committed
155 156
      #{parentCode,jdbcType=VARCHAR}, #{fullName,jdbcType=VARCHAR}, #{acctProp,jdbcType=INTEGER}, 
      #{subProp,jdbcType=INTEGER}, #{acctLevel,jdbcType=INTEGER}, #{direction,jdbcType=INTEGER}, 
gary's avatar
gary committed
157
      #{isLeaf,jdbcType=BIT}, #{ruleType,jdbcType=INTEGER}, #{isActive,jdbcType=BIT}, 
neo's avatar
neo committed
158
      #{englishName,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR})
159
  </insert>
160
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.StandardAccount">
161 162 163 164
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
165
    insert into standard_account
166
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
167
      <if test="id != null">
gary's avatar
gary committed
168
        id,
169 170
      </if>
      <if test="code != null">
gary's avatar
gary committed
171
        code,
172 173
      </if>
      <if test="name != null">
gary's avatar
gary committed
174
        name,
175 176
      </if>
      <if test="parentCode != null">
gary's avatar
gary committed
177
        parent_code,
178 179
      </if>
      <if test="fullName != null">
gary's avatar
gary committed
180
        full_name,
181 182
      </if>
      <if test="acctProp != null">
gary's avatar
gary committed
183
        acct_prop,
184 185
      </if>
      <if test="subProp != null">
gary's avatar
gary committed
186
        sub_prop,
187 188
      </if>
      <if test="acctLevel != null">
gary's avatar
gary committed
189
        acct_level,
190 191
      </if>
      <if test="direction != null">
gary's avatar
gary committed
192
        direction,
193 194
      </if>
      <if test="isLeaf != null">
gary's avatar
gary committed
195
        is_leaf,
196 197
      </if>
      <if test="ruleType != null">
gary's avatar
gary committed
198
        rule_type,
199 200
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
201
        is_active,
202 203
      </if>
      <if test="englishName != null">
gary's avatar
gary committed
204
        english_name,
205
      </if>
neo's avatar
neo committed
206
      <if test="industryId != null">
gary's avatar
gary committed
207
        industry_id,
208 209 210
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
211 212
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
213 214 215 216 217 218 219 220 221 222 223 224 225 226
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="parentCode != null">
        #{parentCode,jdbcType=VARCHAR},
      </if>
      <if test="fullName != null">
        #{fullName,jdbcType=VARCHAR},
      </if>
      <if test="acctProp != null">
gary's avatar
gary committed
227
        #{acctProp,jdbcType=INTEGER},
228 229
      </if>
      <if test="subProp != null">
gary's avatar
gary committed
230
        #{subProp,jdbcType=INTEGER},
231 232
      </if>
      <if test="acctLevel != null">
gary's avatar
gary committed
233
        #{acctLevel,jdbcType=INTEGER},
234 235
      </if>
      <if test="direction != null">
gary's avatar
gary committed
236
        #{direction,jdbcType=INTEGER},
237 238
      </if>
      <if test="isLeaf != null">
gary's avatar
gary committed
239
        #{isLeaf,jdbcType=BIT},
240 241
      </if>
      <if test="ruleType != null">
gary's avatar
gary committed
242
        #{ruleType,jdbcType=INTEGER},
243 244
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
245
        #{isActive,jdbcType=BIT},
246 247 248 249
      </if>
      <if test="englishName != null">
        #{englishName,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
250 251
      <if test="industryId != null">
        #{industryId,jdbcType=VARCHAR},
252 253 254
      </if>
    </trim>
  </insert>
255
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.StandardAccountExample" resultType="java.lang.Long">
256 257 258 259
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
260
    select count(*) from standard_account
261 262 263 264 265 266 267 268 269
    <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
270
    update standard_account
271
    <set>
neo's avatar
neo committed
272
      <if test="record.id != null">
gary's avatar
gary committed
273
        id = #{record.id,jdbcType=VARCHAR},
274 275
      </if>
      <if test="record.code != null">
gary's avatar
gary committed
276
        code = #{record.code,jdbcType=VARCHAR},
277 278
      </if>
      <if test="record.name != null">
gary's avatar
gary committed
279
        name = #{record.name,jdbcType=VARCHAR},
280 281
      </if>
      <if test="record.parentCode != null">
gary's avatar
gary committed
282
        parent_code = #{record.parentCode,jdbcType=VARCHAR},
283 284
      </if>
      <if test="record.fullName != null">
gary's avatar
gary committed
285
        full_name = #{record.fullName,jdbcType=VARCHAR},
286 287
      </if>
      <if test="record.acctProp != null">
gary's avatar
gary committed
288
        acct_prop = #{record.acctProp,jdbcType=INTEGER},
289 290
      </if>
      <if test="record.subProp != null">
gary's avatar
gary committed
291
        sub_prop = #{record.subProp,jdbcType=INTEGER},
292 293
      </if>
      <if test="record.acctLevel != null">
gary's avatar
gary committed
294
        acct_level = #{record.acctLevel,jdbcType=INTEGER},
295 296
      </if>
      <if test="record.direction != null">
gary's avatar
gary committed
297
        direction = #{record.direction,jdbcType=INTEGER},
298 299
      </if>
      <if test="record.isLeaf != null">
gary's avatar
gary committed
300
        is_leaf = #{record.isLeaf,jdbcType=BIT},
301 302
      </if>
      <if test="record.ruleType != null">
gary's avatar
gary committed
303
        rule_type = #{record.ruleType,jdbcType=INTEGER},
304 305
      </if>
      <if test="record.isActive != null">
gary's avatar
gary committed
306
        is_active = #{record.isActive,jdbcType=BIT},
307 308
      </if>
      <if test="record.englishName != null">
gary's avatar
gary committed
309
        english_name = #{record.englishName,jdbcType=VARCHAR},
310
      </if>
neo's avatar
neo committed
311
      <if test="record.industryId != null">
gary's avatar
gary committed
312
        industry_id = #{record.industryId,jdbcType=VARCHAR},
313 314 315 316 317 318 319 320 321 322 323
      </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
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
    update standard_account
    set id = #{record.id,jdbcType=VARCHAR},
      code = #{record.code,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      parent_code = #{record.parentCode,jdbcType=VARCHAR},
      full_name = #{record.fullName,jdbcType=VARCHAR},
      acct_prop = #{record.acctProp,jdbcType=INTEGER},
      sub_prop = #{record.subProp,jdbcType=INTEGER},
      acct_level = #{record.acctLevel,jdbcType=INTEGER},
      direction = #{record.direction,jdbcType=INTEGER},
      is_leaf = #{record.isLeaf,jdbcType=BIT},
      rule_type = #{record.ruleType,jdbcType=INTEGER},
      is_active = #{record.isActive,jdbcType=BIT},
      english_name = #{record.englishName,jdbcType=VARCHAR},
      industry_id = #{record.industryId,jdbcType=VARCHAR}
339 340 341 342
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
343
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.StandardAccount">
344 345 346 347
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
348
    update standard_account
349 350
    <set>
      <if test="code != null">
gary's avatar
gary committed
351
        code = #{code,jdbcType=VARCHAR},
352 353
      </if>
      <if test="name != null">
gary's avatar
gary committed
354
        name = #{name,jdbcType=VARCHAR},
355 356
      </if>
      <if test="parentCode != null">
gary's avatar
gary committed
357
        parent_code = #{parentCode,jdbcType=VARCHAR},
358 359
      </if>
      <if test="fullName != null">
gary's avatar
gary committed
360
        full_name = #{fullName,jdbcType=VARCHAR},
361 362
      </if>
      <if test="acctProp != null">
gary's avatar
gary committed
363
        acct_prop = #{acctProp,jdbcType=INTEGER},
364 365
      </if>
      <if test="subProp != null">
gary's avatar
gary committed
366
        sub_prop = #{subProp,jdbcType=INTEGER},
367 368
      </if>
      <if test="acctLevel != null">
gary's avatar
gary committed
369
        acct_level = #{acctLevel,jdbcType=INTEGER},
370 371
      </if>
      <if test="direction != null">
gary's avatar
gary committed
372
        direction = #{direction,jdbcType=INTEGER},
373 374
      </if>
      <if test="isLeaf != null">
gary's avatar
gary committed
375
        is_leaf = #{isLeaf,jdbcType=BIT},
376 377
      </if>
      <if test="ruleType != null">
gary's avatar
gary committed
378
        rule_type = #{ruleType,jdbcType=INTEGER},
379 380
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
381
        is_active = #{isActive,jdbcType=BIT},
382 383
      </if>
      <if test="englishName != null">
gary's avatar
gary committed
384
        english_name = #{englishName,jdbcType=VARCHAR},
385
      </if>
neo's avatar
neo committed
386
      <if test="industryId != null">
gary's avatar
gary committed
387
        industry_id = #{industryId,jdbcType=VARCHAR},
388 389
      </if>
    </set>
gary's avatar
gary committed
390
    where id = #{id,jdbcType=VARCHAR}
391
  </update>
392
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.StandardAccount">
393 394 395 396
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
    update standard_account
    set code = #{code,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      parent_code = #{parentCode,jdbcType=VARCHAR},
      full_name = #{fullName,jdbcType=VARCHAR},
      acct_prop = #{acctProp,jdbcType=INTEGER},
      sub_prop = #{subProp,jdbcType=INTEGER},
      acct_level = #{acctLevel,jdbcType=INTEGER},
      direction = #{direction,jdbcType=INTEGER},
      is_leaf = #{isLeaf,jdbcType=BIT},
      rule_type = #{ruleType,jdbcType=INTEGER},
      is_active = #{isActive,jdbcType=BIT},
      english_name = #{englishName,jdbcType=VARCHAR},
      industry_id = #{industryId,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
412
  </update>
413
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.StandardAccountExample" resultMap="BaseResultMap">
414 415 416 417 418 419 420 421 422
    <!--
      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
423
    from standard_account
neo's avatar
neo committed
424 425 426 427 428 429 430
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
431
</mapper>