CustBalanceStdMapper.xml 16.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.CustBalanceStdMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.CustBalanceStd">
    <!--
      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
    <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="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="BEG_DEBIT_BAL" jdbcType="DECIMAL" property="begDebitBal" />
    <result column="BEG_CREDIT_BAL" jdbcType="DECIMAL" property="begCreditBal" />
    <result column="END_DEBIT_BAL" jdbcType="DECIMAL" property="endDebitBal" />
    <result column="END_CREDIT_BAL" jdbcType="DECIMAL" property="endCreditBal" />
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.
    -->
neo's avatar
neo committed
95 96 97
    BALANCE_ID, PERIOD_ID, ACCT_CODE, CUSTOMER_CODE, BEG_BAL, DEBIT_BAL, CREDIT_BAL, 
    YEAR_DEBIT_BAL, YEAR_CREDIT_BAL, END_BAL, BEG_DEBIT_BAL, BEG_CREDIT_BAL, END_DEBIT_BAL, 
    END_CREDIT_BAL
98 99 100 101 102 103 104 105 106 107 108
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdExample" 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
109
    from CUST_BALANCE_STD
110 111 112 113 114 115 116 117 118 119 120 121 122 123
    <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
124 125
    from CUST_BALANCE_STD
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
126 127 128 129 130 131
  </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
132 133
    delete from CUST_BALANCE_STD
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
134 135 136 137 138 139
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
140
    delete from CUST_BALANCE_STD
141 142 143 144 145 146 147 148 149
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
150 151 152 153 154 155
    insert into CUST_BALANCE_STD (BALANCE_ID, PERIOD_ID, ACCT_CODE, 
      CUSTOMER_CODE, BEG_BAL, DEBIT_BAL, 
      CREDIT_BAL, YEAR_DEBIT_BAL, YEAR_CREDIT_BAL, 
      END_BAL, BEG_DEBIT_BAL, BEG_CREDIT_BAL, 
      END_DEBIT_BAL, END_CREDIT_BAL)
    values (#{balanceId,jdbcType=VARCHAR}, #{periodId,jdbcType=DECIMAL}, #{acctCode,jdbcType=VARCHAR}, 
156 157 158 159 160 161 162 163 164 165
      #{customerCode,jdbcType=VARCHAR}, #{begBal,jdbcType=DECIMAL}, #{debitBal,jdbcType=DECIMAL}, 
      #{creditBal,jdbcType=DECIMAL}, #{yearDebitBal,jdbcType=DECIMAL}, #{yearCreditBal,jdbcType=DECIMAL}, 
      #{endBal,jdbcType=DECIMAL}, #{begDebitBal,jdbcType=DECIMAL}, #{begCreditBal,jdbcType=DECIMAL}, 
      #{endDebitBal,jdbcType=DECIMAL}, #{endCreditBal,jdbcType=DECIMAL})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
166
    insert into CUST_BALANCE_STD
167
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
168 169
      <if test="balanceId != null">
        BALANCE_ID,
170
      </if>
neo's avatar
neo committed
171 172
      <if test="periodId != null">
        PERIOD_ID,
173 174
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
175
        ACCT_CODE,
176 177
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
178
        CUSTOMER_CODE,
179 180
      </if>
      <if test="begBal != null">
neo's avatar
neo committed
181
        BEG_BAL,
182 183
      </if>
      <if test="debitBal != null">
neo's avatar
neo committed
184
        DEBIT_BAL,
185 186
      </if>
      <if test="creditBal != null">
neo's avatar
neo committed
187
        CREDIT_BAL,
188 189
      </if>
      <if test="yearDebitBal != null">
neo's avatar
neo committed
190
        YEAR_DEBIT_BAL,
191 192
      </if>
      <if test="yearCreditBal != null">
neo's avatar
neo committed
193
        YEAR_CREDIT_BAL,
194 195
      </if>
      <if test="endBal != null">
neo's avatar
neo committed
196
        END_BAL,
197 198
      </if>
      <if test="begDebitBal != null">
neo's avatar
neo committed
199
        BEG_DEBIT_BAL,
200 201
      </if>
      <if test="begCreditBal != null">
neo's avatar
neo committed
202
        BEG_CREDIT_BAL,
203 204
      </if>
      <if test="endDebitBal != null">
neo's avatar
neo committed
205
        END_DEBIT_BAL,
206 207
      </if>
      <if test="endCreditBal != null">
neo's avatar
neo committed
208
        END_CREDIT_BAL,
209 210 211
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
212 213
      <if test="balanceId != null">
        #{balanceId,jdbcType=VARCHAR},
214
      </if>
neo's avatar
neo committed
215 216
      <if test="periodId != null">
        #{periodId,jdbcType=DECIMAL},
217 218 219 220 221 222 223 224 225 226 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
      </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="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="begDebitBal != null">
        #{begDebitBal,jdbcType=DECIMAL},
      </if>
      <if test="begCreditBal != null">
        #{begCreditBal,jdbcType=DECIMAL},
      </if>
      <if test="endDebitBal != null">
        #{endDebitBal,jdbcType=DECIMAL},
      </if>
      <if test="endCreditBal != null">
        #{endCreditBal,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
261
    select count(*) from CUST_BALANCE_STD
262 263 264 265 266 267 268 269 270
    <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
271
    update CUST_BALANCE_STD
272
    <set>
neo's avatar
neo committed
273 274
      <if test="record.balanceId != null">
        BALANCE_ID = #{record.balanceId,jdbcType=VARCHAR},
275
      </if>
neo's avatar
neo committed
276 277
      <if test="record.periodId != null">
        PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
278 279
      </if>
      <if test="record.acctCode != null">
neo's avatar
neo committed
280
        ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
281 282
      </if>
      <if test="record.customerCode != null">
neo's avatar
neo committed
283
        CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
284 285
      </if>
      <if test="record.begBal != null">
neo's avatar
neo committed
286
        BEG_BAL = #{record.begBal,jdbcType=DECIMAL},
287 288
      </if>
      <if test="record.debitBal != null">
neo's avatar
neo committed
289
        DEBIT_BAL = #{record.debitBal,jdbcType=DECIMAL},
290 291
      </if>
      <if test="record.creditBal != null">
neo's avatar
neo committed
292
        CREDIT_BAL = #{record.creditBal,jdbcType=DECIMAL},
293 294
      </if>
      <if test="record.yearDebitBal != null">
neo's avatar
neo committed
295
        YEAR_DEBIT_BAL = #{record.yearDebitBal,jdbcType=DECIMAL},
296 297
      </if>
      <if test="record.yearCreditBal != null">
neo's avatar
neo committed
298
        YEAR_CREDIT_BAL = #{record.yearCreditBal,jdbcType=DECIMAL},
299 300
      </if>
      <if test="record.endBal != null">
neo's avatar
neo committed
301
        END_BAL = #{record.endBal,jdbcType=DECIMAL},
302 303
      </if>
      <if test="record.begDebitBal != null">
neo's avatar
neo committed
304
        BEG_DEBIT_BAL = #{record.begDebitBal,jdbcType=DECIMAL},
305 306
      </if>
      <if test="record.begCreditBal != null">
neo's avatar
neo committed
307
        BEG_CREDIT_BAL = #{record.begCreditBal,jdbcType=DECIMAL},
308 309
      </if>
      <if test="record.endDebitBal != null">
neo's avatar
neo committed
310
        END_DEBIT_BAL = #{record.endDebitBal,jdbcType=DECIMAL},
311 312
      </if>
      <if test="record.endCreditBal != null">
neo's avatar
neo committed
313
        END_CREDIT_BAL = #{record.endCreditBal,jdbcType=DECIMAL},
314 315 316 317 318 319 320 321 322 323 324
      </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
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
    update CUST_BALANCE_STD
    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},
      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},
      BEG_DEBIT_BAL = #{record.begDebitBal,jdbcType=DECIMAL},
      BEG_CREDIT_BAL = #{record.begCreditBal,jdbcType=DECIMAL},
      END_DEBIT_BAL = #{record.endDebitBal,jdbcType=DECIMAL},
      END_CREDIT_BAL = #{record.endCreditBal,jdbcType=DECIMAL}
340 341 342 343 344 345 346 347 348
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
349
    update CUST_BALANCE_STD
350
    <set>
neo's avatar
neo committed
351 352
      <if test="periodId != null">
        PERIOD_ID = #{periodId,jdbcType=DECIMAL},
353 354
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
355
        ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
356 357
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
358
        CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
359 360
      </if>
      <if test="begBal != null">
neo's avatar
neo committed
361
        BEG_BAL = #{begBal,jdbcType=DECIMAL},
362 363
      </if>
      <if test="debitBal != null">
neo's avatar
neo committed
364
        DEBIT_BAL = #{debitBal,jdbcType=DECIMAL},
365 366
      </if>
      <if test="creditBal != null">
neo's avatar
neo committed
367
        CREDIT_BAL = #{creditBal,jdbcType=DECIMAL},
368 369
      </if>
      <if test="yearDebitBal != null">
neo's avatar
neo committed
370
        YEAR_DEBIT_BAL = #{yearDebitBal,jdbcType=DECIMAL},
371 372
      </if>
      <if test="yearCreditBal != null">
neo's avatar
neo committed
373
        YEAR_CREDIT_BAL = #{yearCreditBal,jdbcType=DECIMAL},
374 375
      </if>
      <if test="endBal != null">
neo's avatar
neo committed
376
        END_BAL = #{endBal,jdbcType=DECIMAL},
377 378
      </if>
      <if test="begDebitBal != null">
neo's avatar
neo committed
379
        BEG_DEBIT_BAL = #{begDebitBal,jdbcType=DECIMAL},
380 381
      </if>
      <if test="begCreditBal != null">
neo's avatar
neo committed
382
        BEG_CREDIT_BAL = #{begCreditBal,jdbcType=DECIMAL},
383 384
      </if>
      <if test="endDebitBal != null">
neo's avatar
neo committed
385
        END_DEBIT_BAL = #{endDebitBal,jdbcType=DECIMAL},
386 387
      </if>
      <if test="endCreditBal != null">
neo's avatar
neo committed
388
        END_CREDIT_BAL = #{endCreditBal,jdbcType=DECIMAL},
389 390
      </if>
    </set>
neo's avatar
neo committed
391
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
392 393 394 395 396 397
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
    update CUST_BALANCE_STD
    set PERIOD_ID = #{periodId,jdbcType=DECIMAL},
      ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
      CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
      BEG_BAL = #{begBal,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},
      BEG_DEBIT_BAL = #{begDebitBal,jdbcType=DECIMAL},
      BEG_CREDIT_BAL = #{begCreditBal,jdbcType=DECIMAL},
      END_DEBIT_BAL = #{endDebitBal,jdbcType=DECIMAL},
      END_CREDIT_BAL = #{endCreditBal,jdbcType=DECIMAL}
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
413 414 415 416 417 418 419 420 421 422 423
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdExample" 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
424
    from CUST_BALANCE_STD
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>
432
</mapper>