PeriodCellReferenceMapper.xml 15.1 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.PeriodCellReferenceMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodCellReference">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
9 10 11 12 13 14 15 16 17 18
    <id column="PERIOD" jdbcType="DECIMAL" property="period" />
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="FORMULA_BLOCK_INDEX" jdbcType="DECIMAL" property="formulaBlockIndex" />
    <result column="REFERENCE_FROM_CELL_ID" jdbcType="VARCHAR" property="referenceFromCellId" />
    <result column="REFERENCE_FROM_TEMPLATE_ID" jdbcType="VARCHAR" property="referenceFromTemplateId" />
    <result column="REFERENCE_TO_CELL_ID" jdbcType="VARCHAR" property="referenceToCellId" />
    <result column="REFERENCE_TO_TEMPLATE_ID" jdbcType="VARCHAR" property="referenceToTemplateId" />
    <result column="REFERENCE_FROM_KEY_VALUE_ID" jdbcType="VARCHAR" property="referenceFromKeyValueId" />
    <result column="REFERENCE_TO_KEY_VALUE_ID" jdbcType="VARCHAR" property="referenceToKeyValueId" />
    <result column="IS_VALIDATION" jdbcType="DECIMAL" property="isValidation" />
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
  </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>
47
            </foreach>
48
          </trim>
49
        </if>
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
      </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>
82
        </if>
83 84 85 86 87 88 89 90
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
91 92 93
    PERIOD, ID, FORMULA_BLOCK_INDEX, REFERENCE_FROM_CELL_ID, REFERENCE_FROM_TEMPLATE_ID, 
    REFERENCE_TO_CELL_ID, REFERENCE_TO_TEMPLATE_ID, REFERENCE_FROM_KEY_VALUE_ID, REFERENCE_TO_KEY_VALUE_ID, 
    IS_VALIDATION
94 95 96 97 98 99 100 101 102 103 104
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReferenceExample" 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" />
neo's avatar
neo committed
105
    from PERIOD_CELL_REFERENCE
106 107 108 109 110 111 112 113 114 115 116 117 118 119
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReferenceKey" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
neo's avatar
neo committed
120 121 122
    from PERIOD_CELL_REFERENCE
    where PERIOD = #{period,jdbcType=DECIMAL}
      and ID = #{id,jdbcType=VARCHAR}
123 124 125 126 127 128
  </select>
  <delete id="deleteByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReferenceKey">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
129 130 131
    delete from PERIOD_CELL_REFERENCE
    where PERIOD = #{period,jdbcType=DECIMAL}
      and ID = #{id,jdbcType=VARCHAR}
132 133 134 135 136 137
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReferenceExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
138
    delete from PERIOD_CELL_REFERENCE
139 140 141 142 143 144 145 146 147
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReference">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
148 149 150 151 152 153 154 155 156 157
    insert into PERIOD_CELL_REFERENCE (PERIOD, ID, FORMULA_BLOCK_INDEX, 
      REFERENCE_FROM_CELL_ID, REFERENCE_FROM_TEMPLATE_ID, 
      REFERENCE_TO_CELL_ID, REFERENCE_TO_TEMPLATE_ID, 
      REFERENCE_FROM_KEY_VALUE_ID, REFERENCE_TO_KEY_VALUE_ID, 
      IS_VALIDATION)
    values (#{period,jdbcType=DECIMAL}, #{id,jdbcType=VARCHAR}, #{formulaBlockIndex,jdbcType=DECIMAL}, 
      #{referenceFromCellId,jdbcType=VARCHAR}, #{referenceFromTemplateId,jdbcType=VARCHAR}, 
      #{referenceToCellId,jdbcType=VARCHAR}, #{referenceToTemplateId,jdbcType=VARCHAR}, 
      #{referenceFromKeyValueId,jdbcType=VARCHAR}, #{referenceToKeyValueId,jdbcType=VARCHAR}, 
      #{isValidation,jdbcType=DECIMAL})
158 159 160 161 162 163
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReference">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
164
    insert into PERIOD_CELL_REFERENCE
165 166
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="period != null">
neo's avatar
neo committed
167 168 169 170
        PERIOD,
      </if>
      <if test="id != null">
        ID,
171 172
      </if>
      <if test="formulaBlockIndex != null">
neo's avatar
neo committed
173
        FORMULA_BLOCK_INDEX,
174
      </if>
neo's avatar
neo committed
175 176
      <if test="referenceFromCellId != null">
        REFERENCE_FROM_CELL_ID,
177
      </if>
neo's avatar
neo committed
178 179
      <if test="referenceFromTemplateId != null">
        REFERENCE_FROM_TEMPLATE_ID,
180
      </if>
neo's avatar
neo committed
181 182
      <if test="referenceToCellId != null">
        REFERENCE_TO_CELL_ID,
183
      </if>
neo's avatar
neo committed
184 185
      <if test="referenceToTemplateId != null">
        REFERENCE_TO_TEMPLATE_ID,
186
      </if>
neo's avatar
neo committed
187 188
      <if test="referenceFromKeyValueId != null">
        REFERENCE_FROM_KEY_VALUE_ID,
189
      </if>
neo's avatar
neo committed
190 191
      <if test="referenceToKeyValueId != null">
        REFERENCE_TO_KEY_VALUE_ID,
192 193
      </if>
      <if test="isValidation != null">
neo's avatar
neo committed
194
        IS_VALIDATION,
195 196 197 198
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="period != null">
neo's avatar
neo committed
199 200 201 202
        #{period,jdbcType=DECIMAL},
      </if>
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
203 204
      </if>
      <if test="formulaBlockIndex != null">
neo's avatar
neo committed
205
        #{formulaBlockIndex,jdbcType=DECIMAL},
206
      </if>
neo's avatar
neo committed
207 208
      <if test="referenceFromCellId != null">
        #{referenceFromCellId,jdbcType=VARCHAR},
209
      </if>
neo's avatar
neo committed
210 211
      <if test="referenceFromTemplateId != null">
        #{referenceFromTemplateId,jdbcType=VARCHAR},
212
      </if>
neo's avatar
neo committed
213 214
      <if test="referenceToCellId != null">
        #{referenceToCellId,jdbcType=VARCHAR},
215
      </if>
neo's avatar
neo committed
216 217
      <if test="referenceToTemplateId != null">
        #{referenceToTemplateId,jdbcType=VARCHAR},
218
      </if>
neo's avatar
neo committed
219 220
      <if test="referenceFromKeyValueId != null">
        #{referenceFromKeyValueId,jdbcType=VARCHAR},
221
      </if>
neo's avatar
neo committed
222 223
      <if test="referenceToKeyValueId != null">
        #{referenceToKeyValueId,jdbcType=VARCHAR},
224 225
      </if>
      <if test="isValidation != null">
neo's avatar
neo committed
226
        #{isValidation,jdbcType=DECIMAL},
227 228 229 230 231 232 233 234
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReferenceExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
235
    select count(*) from PERIOD_CELL_REFERENCE
236 237 238 239 240 241 242 243 244
    <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.
    -->
neo's avatar
neo committed
245
    update PERIOD_CELL_REFERENCE
246 247
    <set>
      <if test="record.period != null">
neo's avatar
neo committed
248 249 250 251
        PERIOD = #{record.period,jdbcType=DECIMAL},
      </if>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
252 253
      </if>
      <if test="record.formulaBlockIndex != null">
neo's avatar
neo committed
254
        FORMULA_BLOCK_INDEX = #{record.formulaBlockIndex,jdbcType=DECIMAL},
255
      </if>
neo's avatar
neo committed
256 257
      <if test="record.referenceFromCellId != null">
        REFERENCE_FROM_CELL_ID = #{record.referenceFromCellId,jdbcType=VARCHAR},
258
      </if>
neo's avatar
neo committed
259 260
      <if test="record.referenceFromTemplateId != null">
        REFERENCE_FROM_TEMPLATE_ID = #{record.referenceFromTemplateId,jdbcType=VARCHAR},
261
      </if>
neo's avatar
neo committed
262 263
      <if test="record.referenceToCellId != null">
        REFERENCE_TO_CELL_ID = #{record.referenceToCellId,jdbcType=VARCHAR},
264
      </if>
neo's avatar
neo committed
265 266
      <if test="record.referenceToTemplateId != null">
        REFERENCE_TO_TEMPLATE_ID = #{record.referenceToTemplateId,jdbcType=VARCHAR},
267
      </if>
neo's avatar
neo committed
268 269
      <if test="record.referenceFromKeyValueId != null">
        REFERENCE_FROM_KEY_VALUE_ID = #{record.referenceFromKeyValueId,jdbcType=VARCHAR},
270
      </if>
neo's avatar
neo committed
271 272
      <if test="record.referenceToKeyValueId != null">
        REFERENCE_TO_KEY_VALUE_ID = #{record.referenceToKeyValueId,jdbcType=VARCHAR},
273 274
      </if>
      <if test="record.isValidation != null">
neo's avatar
neo committed
275
        IS_VALIDATION = #{record.isValidation,jdbcType=DECIMAL},
276 277 278 279 280 281 282 283 284 285 286
      </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.
    -->
neo's avatar
neo committed
287 288 289 290 291 292 293 294 295 296 297
    update PERIOD_CELL_REFERENCE
    set PERIOD = #{record.period,jdbcType=DECIMAL},
      ID = #{record.id,jdbcType=VARCHAR},
      FORMULA_BLOCK_INDEX = #{record.formulaBlockIndex,jdbcType=DECIMAL},
      REFERENCE_FROM_CELL_ID = #{record.referenceFromCellId,jdbcType=VARCHAR},
      REFERENCE_FROM_TEMPLATE_ID = #{record.referenceFromTemplateId,jdbcType=VARCHAR},
      REFERENCE_TO_CELL_ID = #{record.referenceToCellId,jdbcType=VARCHAR},
      REFERENCE_TO_TEMPLATE_ID = #{record.referenceToTemplateId,jdbcType=VARCHAR},
      REFERENCE_FROM_KEY_VALUE_ID = #{record.referenceFromKeyValueId,jdbcType=VARCHAR},
      REFERENCE_TO_KEY_VALUE_ID = #{record.referenceToKeyValueId,jdbcType=VARCHAR},
      IS_VALIDATION = #{record.isValidation,jdbcType=DECIMAL}
298 299 300 301 302 303 304 305 306
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReference">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
307
    update PERIOD_CELL_REFERENCE
308 309
    <set>
      <if test="formulaBlockIndex != null">
neo's avatar
neo committed
310
        FORMULA_BLOCK_INDEX = #{formulaBlockIndex,jdbcType=DECIMAL},
311
      </if>
neo's avatar
neo committed
312 313
      <if test="referenceFromCellId != null">
        REFERENCE_FROM_CELL_ID = #{referenceFromCellId,jdbcType=VARCHAR},
314
      </if>
neo's avatar
neo committed
315 316
      <if test="referenceFromTemplateId != null">
        REFERENCE_FROM_TEMPLATE_ID = #{referenceFromTemplateId,jdbcType=VARCHAR},
317
      </if>
neo's avatar
neo committed
318 319
      <if test="referenceToCellId != null">
        REFERENCE_TO_CELL_ID = #{referenceToCellId,jdbcType=VARCHAR},
320
      </if>
neo's avatar
neo committed
321 322
      <if test="referenceToTemplateId != null">
        REFERENCE_TO_TEMPLATE_ID = #{referenceToTemplateId,jdbcType=VARCHAR},
323
      </if>
neo's avatar
neo committed
324 325
      <if test="referenceFromKeyValueId != null">
        REFERENCE_FROM_KEY_VALUE_ID = #{referenceFromKeyValueId,jdbcType=VARCHAR},
326
      </if>
neo's avatar
neo committed
327 328
      <if test="referenceToKeyValueId != null">
        REFERENCE_TO_KEY_VALUE_ID = #{referenceToKeyValueId,jdbcType=VARCHAR},
329 330
      </if>
      <if test="isValidation != null">
neo's avatar
neo committed
331
        IS_VALIDATION = #{isValidation,jdbcType=DECIMAL},
332 333
      </if>
    </set>
neo's avatar
neo committed
334 335
    where PERIOD = #{period,jdbcType=DECIMAL}
      and ID = #{id,jdbcType=VARCHAR}
336 337 338 339 340 341
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReference">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
342 343 344 345 346 347 348 349 350 351 352
    update PERIOD_CELL_REFERENCE
    set FORMULA_BLOCK_INDEX = #{formulaBlockIndex,jdbcType=DECIMAL},
      REFERENCE_FROM_CELL_ID = #{referenceFromCellId,jdbcType=VARCHAR},
      REFERENCE_FROM_TEMPLATE_ID = #{referenceFromTemplateId,jdbcType=VARCHAR},
      REFERENCE_TO_CELL_ID = #{referenceToCellId,jdbcType=VARCHAR},
      REFERENCE_TO_TEMPLATE_ID = #{referenceToTemplateId,jdbcType=VARCHAR},
      REFERENCE_FROM_KEY_VALUE_ID = #{referenceFromKeyValueId,jdbcType=VARCHAR},
      REFERENCE_TO_KEY_VALUE_ID = #{referenceToKeyValueId,jdbcType=VARCHAR},
      IS_VALIDATION = #{isValidation,jdbcType=DECIMAL}
    where PERIOD = #{period,jdbcType=DECIMAL}
      and ID = #{id,jdbcType=VARCHAR}
353 354 355 356 357 358 359 360 361 362 363
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellReferenceExample" 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" />
neo's avatar
neo committed
364
    from PERIOD_CELL_REFERENCE
365 366 367 368 369 370 371
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
372
</mapper>