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