PeriodCellTemplateMapper.xml 17.7 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.PeriodCellTemplateMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodCellTemplate">
    <!--
      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="report_template_id" jdbcType="BIGINT" property="reportTemplateId" />
    <result column="row_index" jdbcType="INTEGER" property="rowIndex" />
    <result column="row_name" jdbcType="VARCHAR" property="rowName" />
    <result column="column_index" jdbcType="INTEGER" property="columnIndex" />
    <result column="column_name" jdbcType="VARCHAR" property="columnName" />
    <result column="comment" jdbcType="VARCHAR" property="comment" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="cell_template_id" jdbcType="BIGINT" property="cellTemplateId" />
    <result column="data_type" jdbcType="INTEGER" property="dataType" />
    <result column="is_read_only" jdbcType="INTEGER" property="isReadOnly" />
    <result column="copy_from_id" jdbcType="BIGINT" property="copyFromId" />
    <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, report_template_id, row_index, row_name, column_index, `column_name`, 
    `comment`, create_time, update_time, cell_template_id, data_type, is_read_only, copy_from_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.PeriodCellTemplateExample" 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_cell_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_cell_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_cell_template
    where id = #{id,jdbcType=BIGINT}
137 138 139 140 141 142
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellTemplateExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
143
    delete from period_cell_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.PeriodCellTemplate">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
153 154 155 156 157 158 159 160
    insert into period_cell_template (id, period, report_template_id, 
      row_index, row_name, column_index, 
      `column_name`, `comment`, create_time, 
      update_time, cell_template_id, data_type, 
      is_read_only, copy_from_id, create_by, 
      update_by, project_id)
    values (#{id,jdbcType=BIGINT}, #{period,jdbcType=INTEGER}, #{reportTemplateId,jdbcType=BIGINT}, 
      #{rowIndex,jdbcType=INTEGER}, #{rowName,jdbcType=VARCHAR}, #{columnIndex,jdbcType=INTEGER}, 
161
      #{columnName,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
162 163
      #{updateTime,jdbcType=TIMESTAMP}, #{cellTemplateId,jdbcType=BIGINT}, #{dataType,jdbcType=INTEGER}, 
      #{isReadOnly,jdbcType=INTEGER}, #{copyFromId,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.PeriodCellTemplate">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
171
    insert into period_cell_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="reportTemplateId != null">
180
        report_template_id,
181 182
      </if>
      <if test="rowIndex != null">
183
        row_index,
184 185
      </if>
      <if test="rowName != null">
186
        row_name,
187 188
      </if>
      <if test="columnIndex != null">
189
        column_index,
190 191
      </if>
      <if test="columnName != null">
192
        `column_name`,
193 194
      </if>
      <if test="comment != null">
195
        `comment`,
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="cellTemplateId != null">
204
        cell_template_id,
205 206
      </if>
      <if test="dataType != null">
207
        data_type,
208 209
      </if>
      <if test="isReadOnly != null">
210
        is_read_only,
211 212
      </if>
      <if test="copyFromId != null">
213
        copy_from_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
      </if>
      <if test="reportTemplateId != null">
233
        #{reportTemplateId,jdbcType=BIGINT},
234 235
      </if>
      <if test="rowIndex != null">
236
        #{rowIndex,jdbcType=INTEGER},
237 238 239 240 241
      </if>
      <if test="rowName != null">
        #{rowName,jdbcType=VARCHAR},
      </if>
      <if test="columnIndex != null">
242
        #{columnIndex,jdbcType=INTEGER},
243 244 245 246 247 248 249 250 251 252 253 254 255 256
      </if>
      <if test="columnName != null">
        #{columnName,jdbcType=VARCHAR},
      </if>
      <if test="comment != null">
        #{comment,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="cellTemplateId != null">
257
        #{cellTemplateId,jdbcType=BIGINT},
258 259
      </if>
      <if test="dataType != null">
260
        #{dataType,jdbcType=INTEGER},
261 262
      </if>
      <if test="isReadOnly != null">
263
        #{isReadOnly,jdbcType=INTEGER},
264 265
      </if>
      <if test="copyFromId != null">
266
        #{copyFromId,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.PeriodCellTemplateExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
284
    select count(*) from period_cell_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_cell_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.reportTemplateId != null">
303
        report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
304 305
      </if>
      <if test="record.rowIndex != null">
306
        row_index = #{record.rowIndex,jdbcType=INTEGER},
307 308
      </if>
      <if test="record.rowName != null">
309
        row_name = #{record.rowName,jdbcType=VARCHAR},
310 311
      </if>
      <if test="record.columnIndex != null">
312
        column_index = #{record.columnIndex,jdbcType=INTEGER},
313 314
      </if>
      <if test="record.columnName != null">
315
        `column_name` = #{record.columnName,jdbcType=VARCHAR},
316 317
      </if>
      <if test="record.comment != null">
318
        `comment` = #{record.comment,jdbcType=VARCHAR},
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.cellTemplateId != null">
327
        cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
328 329
      </if>
      <if test="record.dataType != null">
330
        data_type = #{record.dataType,jdbcType=INTEGER},
331 332
      </if>
      <if test="record.isReadOnly != null">
333
        is_read_only = #{record.isReadOnly,jdbcType=INTEGER},
334 335
      </if>
      <if test="record.copyFromId != null">
336
        copy_from_id = #{record.copyFromId,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_cell_template
    set id = #{record.id,jdbcType=BIGINT},
      period = #{record.period,jdbcType=INTEGER},
      report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
      row_index = #{record.rowIndex,jdbcType=INTEGER},
      row_name = #{record.rowName,jdbcType=VARCHAR},
      column_index = #{record.columnIndex,jdbcType=INTEGER},
      `column_name` = #{record.columnName,jdbcType=VARCHAR},
      `comment` = #{record.comment,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
      data_type = #{record.dataType,jdbcType=INTEGER},
      is_read_only = #{record.isReadOnly,jdbcType=INTEGER},
      copy_from_id = #{record.copyFromId,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.PeriodCellTemplate">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
384
    update period_cell_template
385 386
    <set>
      <if test="period != null">
387
        period = #{period,jdbcType=INTEGER},
388 389
      </if>
      <if test="reportTemplateId != null">
390
        report_template_id = #{reportTemplateId,jdbcType=BIGINT},
391 392
      </if>
      <if test="rowIndex != null">
393
        row_index = #{rowIndex,jdbcType=INTEGER},
394 395
      </if>
      <if test="rowName != null">
396
        row_name = #{rowName,jdbcType=VARCHAR},
397 398
      </if>
      <if test="columnIndex != null">
399
        column_index = #{columnIndex,jdbcType=INTEGER},
400 401
      </if>
      <if test="columnName != null">
402
        `column_name` = #{columnName,jdbcType=VARCHAR},
403 404
      </if>
      <if test="comment != null">
405
        `comment` = #{comment,jdbcType=VARCHAR},
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="cellTemplateId != null">
414
        cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
415 416
      </if>
      <if test="dataType != null">
417
        data_type = #{dataType,jdbcType=INTEGER},
418 419
      </if>
      <if test="isReadOnly != null">
420
        is_read_only = #{isReadOnly,jdbcType=INTEGER},
421 422
      </if>
      <if test="copyFromId != null">
423
        copy_from_id = #{copyFromId,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.PeriodCellTemplate">
    <!--
      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_cell_template
    set period = #{period,jdbcType=INTEGER},
      report_template_id = #{reportTemplateId,jdbcType=BIGINT},
      row_index = #{rowIndex,jdbcType=INTEGER},
      row_name = #{rowName,jdbcType=VARCHAR},
      column_index = #{columnIndex,jdbcType=INTEGER},
      `column_name` = #{columnName,jdbcType=VARCHAR},
      `comment` = #{comment,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
      data_type = #{dataType,jdbcType=INTEGER},
      is_read_only = #{isReadOnly,jdbcType=INTEGER},
      copy_from_id = #{copyFromId,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.PeriodCellTemplateExample" 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_cell_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>