CellTemplateMapper.xml 15.6 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.CellTemplateMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.CellTemplate">
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
    <id column="id" jdbcType="BIGINT" property="id" />
    <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="copy_from_id" jdbcType="BIGINT" property="copyFromId" />
    <result column="data_type" jdbcType="INTEGER" property="dataType" />
gary's avatar
gary committed
20
    <result column="is_read_only" jdbcType="BIT" property="isReadOnly" />
gary's avatar
gary committed
21 22
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
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, report_template_id, row_index, row_name, column_index, column_name, comment, 
    create_time, update_time, copy_from_id, data_type, is_read_only, create_by, update_by
97
  </sql>
98
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.CellTemplateExample" 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 cell_template
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.Long" 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 cell_template
    where id = #{id,jdbcType=BIGINT}
125 126 127 128 129 130
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
131 132
    delete from cell_template
    where id = #{id,jdbcType=BIGINT}
133
  </delete>
134
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.CellTemplateExample">
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 cell_template
140 141 142 143
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
144
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.CellTemplate">
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 154 155
    insert into cell_template (id, report_template_id, row_index, 
      row_name, column_index, column_name, 
      comment, create_time, update_time, 
      copy_from_id, data_type, is_read_only, 
      create_by, update_by)
    values (#{id,jdbcType=BIGINT}, #{reportTemplateId,jdbcType=BIGINT}, #{rowIndex,jdbcType=INTEGER}, 
      #{rowName,jdbcType=VARCHAR}, #{columnIndex,jdbcType=INTEGER}, #{columnName,jdbcType=VARCHAR}, 
156
      #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
gary's avatar
gary committed
157
      #{copyFromId,jdbcType=BIGINT}, #{dataType,jdbcType=INTEGER}, #{isReadOnly,jdbcType=BIT}, 
158 159
      #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR})
  </insert>
160
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.CellTemplate">
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 cell_template
166 167
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
gary's avatar
gary committed
168
        id,
169 170
      </if>
      <if test="reportTemplateId != null">
gary's avatar
gary committed
171
        report_template_id,
172 173
      </if>
      <if test="rowIndex != null">
gary's avatar
gary committed
174
        row_index,
175 176
      </if>
      <if test="rowName != null">
gary's avatar
gary committed
177
        row_name,
178 179
      </if>
      <if test="columnIndex != null">
gary's avatar
gary committed
180
        column_index,
181 182
      </if>
      <if test="columnName != null">
gary's avatar
gary committed
183
        column_name,
184 185
      </if>
      <if test="comment != null">
gary's avatar
gary committed
186
        comment,
187 188
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
189
        create_time,
190 191
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
192
        update_time,
193 194
      </if>
      <if test="copyFromId != null">
gary's avatar
gary committed
195
        copy_from_id,
196 197
      </if>
      <if test="dataType != null">
gary's avatar
gary committed
198
        data_type,
199 200
      </if>
      <if test="isReadOnly != null">
gary's avatar
gary committed
201
        is_read_only,
202 203
      </if>
      <if test="createBy != null">
gary's avatar
gary committed
204
        create_by,
205 206
      </if>
      <if test="updateBy != null">
gary's avatar
gary committed
207
        update_by,
208 209 210 211
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
gary's avatar
gary committed
212
        #{id,jdbcType=BIGINT},
213 214
      </if>
      <if test="reportTemplateId != null">
gary's avatar
gary committed
215
        #{reportTemplateId,jdbcType=BIGINT},
216 217
      </if>
      <if test="rowIndex != null">
gary's avatar
gary committed
218
        #{rowIndex,jdbcType=INTEGER},
219 220 221 222 223
      </if>
      <if test="rowName != null">
        #{rowName,jdbcType=VARCHAR},
      </if>
      <if test="columnIndex != null">
gary's avatar
gary committed
224
        #{columnIndex,jdbcType=INTEGER},
225 226 227 228 229 230 231 232 233 234 235 236 237 238
      </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="copyFromId != null">
gary's avatar
gary committed
239
        #{copyFromId,jdbcType=BIGINT},
240 241
      </if>
      <if test="dataType != null">
gary's avatar
gary committed
242
        #{dataType,jdbcType=INTEGER},
243 244
      </if>
      <if test="isReadOnly != null">
gary's avatar
gary committed
245
        #{isReadOnly,jdbcType=BIT},
246 247 248 249 250 251 252 253 254
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
255
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.CellTemplateExample" 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 cell_template
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 cell_template
271 272
    <set>
      <if test="record.id != null">
gary's avatar
gary committed
273
        id = #{record.id,jdbcType=BIGINT},
274 275
      </if>
      <if test="record.reportTemplateId != null">
gary's avatar
gary committed
276
        report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
277 278
      </if>
      <if test="record.rowIndex != null">
gary's avatar
gary committed
279
        row_index = #{record.rowIndex,jdbcType=INTEGER},
280 281
      </if>
      <if test="record.rowName != null">
gary's avatar
gary committed
282
        row_name = #{record.rowName,jdbcType=VARCHAR},
283 284
      </if>
      <if test="record.columnIndex != null">
gary's avatar
gary committed
285
        column_index = #{record.columnIndex,jdbcType=INTEGER},
286 287
      </if>
      <if test="record.columnName != null">
gary's avatar
gary committed
288
        column_name = #{record.columnName,jdbcType=VARCHAR},
289 290
      </if>
      <if test="record.comment != null">
gary's avatar
gary committed
291
        comment = #{record.comment,jdbcType=VARCHAR},
292 293
      </if>
      <if test="record.createTime != null">
gary's avatar
gary committed
294
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
295 296
      </if>
      <if test="record.updateTime != null">
gary's avatar
gary committed
297
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
298 299
      </if>
      <if test="record.copyFromId != null">
gary's avatar
gary committed
300
        copy_from_id = #{record.copyFromId,jdbcType=BIGINT},
301 302
      </if>
      <if test="record.dataType != null">
gary's avatar
gary committed
303
        data_type = #{record.dataType,jdbcType=INTEGER},
304 305
      </if>
      <if test="record.isReadOnly != null">
gary's avatar
gary committed
306
        is_read_only = #{record.isReadOnly,jdbcType=BIT},
307 308
      </if>
      <if test="record.createBy != null">
gary's avatar
gary committed
309
        create_by = #{record.createBy,jdbcType=VARCHAR},
310 311
      </if>
      <if test="record.updateBy != null">
gary's avatar
gary committed
312
        update_by = #{record.updateBy,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
    update cell_template
    set id = #{record.id,jdbcType=BIGINT},
      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},
      copy_from_id = #{record.copyFromId,jdbcType=BIGINT},
      data_type = #{record.dataType,jdbcType=INTEGER},
gary's avatar
gary committed
336
      is_read_only = #{record.isReadOnly,jdbcType=BIT},
gary's avatar
gary committed
337 338
      create_by = #{record.createBy,jdbcType=VARCHAR},
      update_by = #{record.updateBy,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.CellTemplate">
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 cell_template
349 350
    <set>
      <if test="reportTemplateId != null">
gary's avatar
gary committed
351
        report_template_id = #{reportTemplateId,jdbcType=BIGINT},
352 353
      </if>
      <if test="rowIndex != null">
gary's avatar
gary committed
354
        row_index = #{rowIndex,jdbcType=INTEGER},
355 356
      </if>
      <if test="rowName != null">
gary's avatar
gary committed
357
        row_name = #{rowName,jdbcType=VARCHAR},
358 359
      </if>
      <if test="columnIndex != null">
gary's avatar
gary committed
360
        column_index = #{columnIndex,jdbcType=INTEGER},
361 362
      </if>
      <if test="columnName != null">
gary's avatar
gary committed
363
        column_name = #{columnName,jdbcType=VARCHAR},
364 365
      </if>
      <if test="comment != null">
gary's avatar
gary committed
366
        comment = #{comment,jdbcType=VARCHAR},
367 368
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
369
        create_time = #{createTime,jdbcType=TIMESTAMP},
370 371
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
372
        update_time = #{updateTime,jdbcType=TIMESTAMP},
373 374
      </if>
      <if test="copyFromId != null">
gary's avatar
gary committed
375
        copy_from_id = #{copyFromId,jdbcType=BIGINT},
376 377
      </if>
      <if test="dataType != null">
gary's avatar
gary committed
378
        data_type = #{dataType,jdbcType=INTEGER},
379 380
      </if>
      <if test="isReadOnly != null">
gary's avatar
gary committed
381
        is_read_only = #{isReadOnly,jdbcType=BIT},
382 383
      </if>
      <if test="createBy != null">
gary's avatar
gary committed
384
        create_by = #{createBy,jdbcType=VARCHAR},
385 386
      </if>
      <if test="updateBy != null">
gary's avatar
gary committed
387
        update_by = #{updateBy,jdbcType=VARCHAR},
388 389
      </if>
    </set>
gary's avatar
gary committed
390
    where id = #{id,jdbcType=BIGINT}
391
  </update>
392
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.CellTemplate">
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
    update cell_template
    set 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},
      copy_from_id = #{copyFromId,jdbcType=BIGINT},
      data_type = #{dataType,jdbcType=INTEGER},
gary's avatar
gary committed
408
      is_read_only = #{isReadOnly,jdbcType=BIT},
gary's avatar
gary committed
409 410 411
      create_by = #{createBy,jdbcType=VARCHAR},
      update_by = #{updateBy,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
412
  </update>
413
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.CellTemplateExample" 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 cell_template
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>