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