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