PeriodCellDataMapper.xml 15.9 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.PeriodCellDataMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodCellData">
    <!--
      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
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="report_id" jdbcType="BIGINT" property="reportId" />
    <result column="cell_template_id" jdbcType="BIGINT" property="cellTemplateId" />
    <result column="data" jdbcType="VARCHAR" property="data" />
    <result column="formula_exp" jdbcType="VARCHAR" property="formulaExp" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
    <result column="period" jdbcType="INTEGER" property="period" />
    <result column="keyin_data" jdbcType="VARCHAR" property="keyinData" />
21 22
    <result column="validate_formula_exp" jdbcType="VARCHAR" property="validateFormulaExp" />
    <result column="validate_result" jdbcType="VARCHAR" property="validateResult" />
neo's avatar
neo committed
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 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
  </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.
    -->
95
    id, report_id, cell_template_id, `data`, formula_exp, create_by, create_time, update_by, 
96
    update_time, project_id, period, keyin_data, validate_formula_exp, validate_result
neo's avatar
neo committed
97 98 99 100 101 102 103 104 105 106 107
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellDataExample" 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" />
108
    from period_cell_data
neo's avatar
neo committed
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" />
123 124
    from period_cell_data
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
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.
    -->
131 132
    delete from period_cell_data
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
133 134 135 136 137 138
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellDataExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
139
    delete from period_cell_data
neo's avatar
neo committed
140 141 142 143 144 145 146 147 148
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
149 150 151
    insert into period_cell_data (id, report_id, cell_template_id, 
      `data`, formula_exp, create_by, 
      create_time, update_by, update_time, 
152 153
      project_id, period, keyin_data, 
      validate_formula_exp, validate_result)
154 155
    values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{cellTemplateId,jdbcType=BIGINT}, 
      #{data,jdbcType=VARCHAR}, #{formulaExp,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, 
neo's avatar
neo committed
156
      #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
157 158
      #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{keyinData,jdbcType=VARCHAR}, 
      #{validateFormulaExp,jdbcType=VARCHAR}, #{validateResult,jdbcType=VARCHAR})
neo's avatar
neo committed
159 160 161 162 163 164
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
165
    insert into period_cell_data
neo's avatar
neo committed
166 167
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
168
        id,
neo's avatar
neo committed
169 170
      </if>
      <if test="reportId != null">
171
        report_id,
neo's avatar
neo committed
172 173
      </if>
      <if test="cellTemplateId != null">
174
        cell_template_id,
neo's avatar
neo committed
175 176
      </if>
      <if test="data != null">
177
        `data`,
sherlock's avatar
sherlock committed
178
      </if>
neo's avatar
neo committed
179
      <if test="formulaExp != null">
180
        formula_exp,
neo's avatar
neo committed
181 182
      </if>
      <if test="createBy != null">
183
        create_by,
neo's avatar
neo committed
184 185
      </if>
      <if test="createTime != null">
186
        create_time,
neo's avatar
neo committed
187 188
      </if>
      <if test="updateBy != null">
189
        update_by,
neo's avatar
neo committed
190 191
      </if>
      <if test="updateTime != null">
192
        update_time,
neo's avatar
neo committed
193 194
      </if>
      <if test="projectId != null">
195
        project_id,
neo's avatar
neo committed
196 197
      </if>
      <if test="period != null">
198 199 200 201
        period,
      </if>
      <if test="keyinData != null">
        keyin_data,
neo's avatar
neo committed
202
      </if>
203 204 205 206 207 208
      <if test="validateFormulaExp != null">
        validate_formula_exp,
      </if>
      <if test="validateResult != null">
        validate_result,
      </if>
neo's avatar
neo committed
209 210 211
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
212
        #{id,jdbcType=BIGINT},
neo's avatar
neo committed
213 214
      </if>
      <if test="reportId != null">
215
        #{reportId,jdbcType=BIGINT},
neo's avatar
neo committed
216 217
      </if>
      <if test="cellTemplateId != null">
218
        #{cellTemplateId,jdbcType=BIGINT},
neo's avatar
neo committed
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
      </if>
      <if test="data != null">
        #{data,jdbcType=VARCHAR},
      </if>
      <if test="formulaExp != null">
        #{formulaExp,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="projectId != null">
        #{projectId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
242 243 244 245
        #{period,jdbcType=INTEGER},
      </if>
      <if test="keyinData != null">
        #{keyinData,jdbcType=VARCHAR},
neo's avatar
neo committed
246
      </if>
247 248 249 250 251 252
      <if test="validateFormulaExp != null">
        #{validateFormulaExp,jdbcType=VARCHAR},
      </if>
      <if test="validateResult != null">
        #{validateResult,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
253 254 255 256 257 258 259
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellDataExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
260
    select count(*) from period_cell_data
neo's avatar
neo committed
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.
    -->
270
    update period_cell_data
neo's avatar
neo committed
271 272
    <set>
      <if test="record.id != null">
273
        id = #{record.id,jdbcType=BIGINT},
neo's avatar
neo committed
274 275
      </if>
      <if test="record.reportId != null">
276
        report_id = #{record.reportId,jdbcType=BIGINT},
neo's avatar
neo committed
277 278
      </if>
      <if test="record.cellTemplateId != null">
279
        cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
neo's avatar
neo committed
280 281
      </if>
      <if test="record.data != null">
282
        `data` = #{record.data,jdbcType=VARCHAR},
neo's avatar
neo committed
283 284
      </if>
      <if test="record.formulaExp != null">
285
        formula_exp = #{record.formulaExp,jdbcType=VARCHAR},
neo's avatar
neo committed
286 287
      </if>
      <if test="record.createBy != null">
288
        create_by = #{record.createBy,jdbcType=VARCHAR},
neo's avatar
neo committed
289 290
      </if>
      <if test="record.createTime != null">
291
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
292 293
      </if>
      <if test="record.updateBy != null">
294
        update_by = #{record.updateBy,jdbcType=VARCHAR},
neo's avatar
neo committed
295 296
      </if>
      <if test="record.updateTime != null">
297
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
298 299
      </if>
      <if test="record.projectId != null">
300
        project_id = #{record.projectId,jdbcType=VARCHAR},
neo's avatar
neo committed
301 302
      </if>
      <if test="record.period != null">
303 304 305 306
        period = #{record.period,jdbcType=INTEGER},
      </if>
      <if test="record.keyinData != null">
        keyin_data = #{record.keyinData,jdbcType=VARCHAR},
neo's avatar
neo committed
307
      </if>
308 309 310 311 312 313
      <if test="record.validateFormulaExp != null">
        validate_formula_exp = #{record.validateFormulaExp,jdbcType=VARCHAR},
      </if>
      <if test="record.validateResult != null">
        validate_result = #{record.validateResult,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
314 315 316 317 318 319 320 321 322 323
    </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.
    -->
324 325 326 327 328 329 330 331 332 333 334 335
    update period_cell_data
    set id = #{record.id,jdbcType=BIGINT},
      report_id = #{record.reportId,jdbcType=BIGINT},
      cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
      `data` = #{record.data,jdbcType=VARCHAR},
      formula_exp = #{record.formulaExp,jdbcType=VARCHAR},
      create_by = #{record.createBy,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_by = #{record.updateBy,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      project_id = #{record.projectId,jdbcType=VARCHAR},
      period = #{record.period,jdbcType=INTEGER},
336 337 338
      keyin_data = #{record.keyinData,jdbcType=VARCHAR},
      validate_formula_exp = #{record.validateFormulaExp,jdbcType=VARCHAR},
      validate_result = #{record.validateResult,jdbcType=VARCHAR}
neo's avatar
neo committed
339 340 341 342 343 344 345 346 347
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
348
    update period_cell_data
neo's avatar
neo committed
349 350
    <set>
      <if test="reportId != null">
351
        report_id = #{reportId,jdbcType=BIGINT},
neo's avatar
neo committed
352 353
      </if>
      <if test="cellTemplateId != null">
354
        cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
neo's avatar
neo committed
355 356
      </if>
      <if test="data != null">
357
        `data` = #{data,jdbcType=VARCHAR},
sherlock's avatar
sherlock committed
358
      </if>
neo's avatar
neo committed
359
      <if test="formulaExp != null">
360
        formula_exp = #{formulaExp,jdbcType=VARCHAR},
neo's avatar
neo committed
361 362
      </if>
      <if test="createBy != null">
363
        create_by = #{createBy,jdbcType=VARCHAR},
neo's avatar
neo committed
364 365
      </if>
      <if test="createTime != null">
366
        create_time = #{createTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
367 368
      </if>
      <if test="updateBy != null">
369
        update_by = #{updateBy,jdbcType=VARCHAR},
neo's avatar
neo committed
370 371
      </if>
      <if test="updateTime != null">
372
        update_time = #{updateTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
373 374
      </if>
      <if test="projectId != null">
375
        project_id = #{projectId,jdbcType=VARCHAR},
neo's avatar
neo committed
376 377
      </if>
      <if test="period != null">
378 379 380 381
        period = #{period,jdbcType=INTEGER},
      </if>
      <if test="keyinData != null">
        keyin_data = #{keyinData,jdbcType=VARCHAR},
neo's avatar
neo committed
382
      </if>
383 384 385 386 387 388
      <if test="validateFormulaExp != null">
        validate_formula_exp = #{validateFormulaExp,jdbcType=VARCHAR},
      </if>
      <if test="validateResult != null">
        validate_result = #{validateResult,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
389
    </set>
390
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
391 392 393 394 395 396
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
397 398 399 400 401 402 403 404 405 406 407
    update period_cell_data
    set report_id = #{reportId,jdbcType=BIGINT},
      cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
      `data` = #{data,jdbcType=VARCHAR},
      formula_exp = #{formulaExp,jdbcType=VARCHAR},
      create_by = #{createBy,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      project_id = #{projectId,jdbcType=VARCHAR},
      period = #{period,jdbcType=INTEGER},
408 409 410
      keyin_data = #{keyinData,jdbcType=VARCHAR},
      validate_formula_exp = #{validateFormulaExp,jdbcType=VARCHAR},
      validate_result = #{validateResult,jdbcType=VARCHAR}
411
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
412 413 414 415 416 417 418 419 420 421 422
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellDataExample" 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" />
423
    from period_cell_data
neo's avatar
neo committed
424 425 426 427 428 429 430 431
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>