CustomsInvoiceMapper.xml 15 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.CustomsInvoiceMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.CustomsInvoice">
    <!--
      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
    <id column="CUSTOMS_ID" jdbcType="VARCHAR" property="customsId" />
    <result column="PAY_NUM" jdbcType="VARCHAR" property="payNum" />
    <result column="ISSUE_DATE" jdbcType="TIMESTAMP" property="issueDate" />
    <result column="INVOICE_TAX_AMOUNT" jdbcType="DECIMAL" property="invoiceTaxAmount" />
    <result column="INVOICE_AMOUNT" jdbcType="DECIMAL" property="invoiceAmount" />
    <result column="AUDIT_RESULT" jdbcType="VARCHAR" property="auditResult" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="PERIOD_ID" jdbcType="DECIMAL" property="periodId" />
    <result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
    <result column="STATUS" jdbcType="DECIMAL" property="status" />
    <result column="PART_ACCNTED_PERIOD" jdbcType="DECIMAL" property="partAccntedPeriod" />
    <result column="ACCNTED_PERIOD" jdbcType="DECIMAL" property="accntedPeriod" />
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 47 48
  </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>
49
            </foreach>
50
          </trim>
51
        </if>
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
      </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>
84
        </if>
85 86 87 88 89 90 91 92
      </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
93 94
    CUSTOMS_ID, PAY_NUM, ISSUE_DATE, INVOICE_TAX_AMOUNT, INVOICE_AMOUNT, AUDIT_RESULT, 
    CREATE_TIME, PERIOD_ID, CREATOR_ID, "STATUS", PART_ACCNTED_PERIOD, ACCNTED_PERIOD
95 96 97 98 99 100 101 102 103 104 105
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoiceExample" 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
106
    from CUSTOMS_INVOICE
107 108 109 110 111 112 113
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
neo's avatar
neo committed
114
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
115 116 117 118 119 120
    <!--
      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
121 122
    from CUSTOMS_INVOICE
    where CUSTOMS_ID = #{customsId,jdbcType=VARCHAR}
123 124 125 126 127 128
  </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
129 130
    delete from CUSTOMS_INVOICE
    where CUSTOMS_ID = #{customsId,jdbcType=VARCHAR}
131 132 133 134 135 136
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoiceExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
137
    delete from CUSTOMS_INVOICE
138 139 140 141 142 143 144 145 146
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
147 148 149 150
    insert into CUSTOMS_INVOICE (CUSTOMS_ID, PAY_NUM, ISSUE_DATE, 
      INVOICE_TAX_AMOUNT, INVOICE_AMOUNT, AUDIT_RESULT, 
      CREATE_TIME, PERIOD_ID, CREATOR_ID, 
      "STATUS", PART_ACCNTED_PERIOD, ACCNTED_PERIOD
151 152
      )
    values (#{customsId,jdbcType=VARCHAR}, #{payNum,jdbcType=VARCHAR}, #{issueDate,jdbcType=TIMESTAMP}, 
neo's avatar
neo committed
153 154 155
      #{invoiceTaxAmount,jdbcType=DECIMAL}, #{invoiceAmount,jdbcType=DECIMAL}, #{auditResult,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{periodId,jdbcType=DECIMAL}, #{creatorId,jdbcType=VARCHAR}, 
      #{status,jdbcType=DECIMAL}, #{partAccntedPeriod,jdbcType=DECIMAL}, #{accntedPeriod,jdbcType=DECIMAL}
156 157 158 159 160 161 162
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
163
    insert into CUSTOMS_INVOICE
164 165
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="customsId != null">
neo's avatar
neo committed
166
        CUSTOMS_ID,
167 168
      </if>
      <if test="payNum != null">
neo's avatar
neo committed
169
        PAY_NUM,
170 171
      </if>
      <if test="issueDate != null">
neo's avatar
neo committed
172
        ISSUE_DATE,
173 174
      </if>
      <if test="invoiceTaxAmount != null">
neo's avatar
neo committed
175
        INVOICE_TAX_AMOUNT,
176 177
      </if>
      <if test="invoiceAmount != null">
neo's avatar
neo committed
178 179 180 181
        INVOICE_AMOUNT,
      </if>
      <if test="auditResult != null">
        AUDIT_RESULT,
182 183
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
184
        CREATE_TIME,
185 186
      </if>
      <if test="periodId != null">
neo's avatar
neo committed
187
        PERIOD_ID,
188
      </if>
neo's avatar
neo committed
189 190
      <if test="creatorId != null">
        CREATOR_ID,
191 192
      </if>
      <if test="status != null">
neo's avatar
neo committed
193
        "STATUS",
194 195
      </if>
      <if test="partAccntedPeriod != null">
neo's avatar
neo committed
196
        PART_ACCNTED_PERIOD,
197 198
      </if>
      <if test="accntedPeriod != null">
neo's avatar
neo committed
199
        ACCNTED_PERIOD,
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="customsId != null">
        #{customsId,jdbcType=VARCHAR},
      </if>
      <if test="payNum != null">
        #{payNum,jdbcType=VARCHAR},
      </if>
      <if test="issueDate != null">
        #{issueDate,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceTaxAmount != null">
        #{invoiceTaxAmount,jdbcType=DECIMAL},
      </if>
      <if test="invoiceAmount != null">
        #{invoiceAmount,jdbcType=DECIMAL},
      </if>
neo's avatar
neo committed
218 219 220
      <if test="auditResult != null">
        #{auditResult,jdbcType=VARCHAR},
      </if>
221 222 223 224
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="periodId != null">
neo's avatar
neo committed
225
        #{periodId,jdbcType=DECIMAL},
226
      </if>
neo's avatar
neo committed
227 228
      <if test="creatorId != null">
        #{creatorId,jdbcType=VARCHAR},
229 230
      </if>
      <if test="status != null">
neo's avatar
neo committed
231
        #{status,jdbcType=DECIMAL},
232 233
      </if>
      <if test="partAccntedPeriod != null">
neo's avatar
neo committed
234
        #{partAccntedPeriod,jdbcType=DECIMAL},
235 236
      </if>
      <if test="accntedPeriod != null">
neo's avatar
neo committed
237
        #{accntedPeriod,jdbcType=DECIMAL},
238 239 240 241 242 243 244 245
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoiceExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
246
    select count(*) from CUSTOMS_INVOICE
247 248 249 250 251 252 253 254 255
    <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
256
    update CUSTOMS_INVOICE
257 258
    <set>
      <if test="record.customsId != null">
neo's avatar
neo committed
259
        CUSTOMS_ID = #{record.customsId,jdbcType=VARCHAR},
260 261
      </if>
      <if test="record.payNum != null">
neo's avatar
neo committed
262
        PAY_NUM = #{record.payNum,jdbcType=VARCHAR},
263 264
      </if>
      <if test="record.issueDate != null">
neo's avatar
neo committed
265
        ISSUE_DATE = #{record.issueDate,jdbcType=TIMESTAMP},
266 267
      </if>
      <if test="record.invoiceTaxAmount != null">
neo's avatar
neo committed
268
        INVOICE_TAX_AMOUNT = #{record.invoiceTaxAmount,jdbcType=DECIMAL},
269 270
      </if>
      <if test="record.invoiceAmount != null">
neo's avatar
neo committed
271 272 273 274
        INVOICE_AMOUNT = #{record.invoiceAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.auditResult != null">
        AUDIT_RESULT = #{record.auditResult,jdbcType=VARCHAR},
275 276
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
277
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
278 279
      </if>
      <if test="record.periodId != null">
neo's avatar
neo committed
280
        PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
281
      </if>
neo's avatar
neo committed
282 283
      <if test="record.creatorId != null">
        CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
284 285
      </if>
      <if test="record.status != null">
neo's avatar
neo committed
286
        "STATUS" = #{record.status,jdbcType=DECIMAL},
287 288
      </if>
      <if test="record.partAccntedPeriod != null">
neo's avatar
neo committed
289
        PART_ACCNTED_PERIOD = #{record.partAccntedPeriod,jdbcType=DECIMAL},
290 291
      </if>
      <if test="record.accntedPeriod != null">
neo's avatar
neo committed
292
        ACCNTED_PERIOD = #{record.accntedPeriod,jdbcType=DECIMAL},
293 294 295 296 297 298 299 300 301 302 303
      </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
304 305 306 307 308 309 310 311 312 313 314 315 316
    update CUSTOMS_INVOICE
    set CUSTOMS_ID = #{record.customsId,jdbcType=VARCHAR},
      PAY_NUM = #{record.payNum,jdbcType=VARCHAR},
      ISSUE_DATE = #{record.issueDate,jdbcType=TIMESTAMP},
      INVOICE_TAX_AMOUNT = #{record.invoiceTaxAmount,jdbcType=DECIMAL},
      INVOICE_AMOUNT = #{record.invoiceAmount,jdbcType=DECIMAL},
      AUDIT_RESULT = #{record.auditResult,jdbcType=VARCHAR},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
      CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
      "STATUS" = #{record.status,jdbcType=DECIMAL},
      PART_ACCNTED_PERIOD = #{record.partAccntedPeriod,jdbcType=DECIMAL},
      ACCNTED_PERIOD = #{record.accntedPeriod,jdbcType=DECIMAL}
317 318 319 320 321 322 323 324 325
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
326
    update CUSTOMS_INVOICE
327 328
    <set>
      <if test="payNum != null">
neo's avatar
neo committed
329
        PAY_NUM = #{payNum,jdbcType=VARCHAR},
330 331
      </if>
      <if test="issueDate != null">
neo's avatar
neo committed
332
        ISSUE_DATE = #{issueDate,jdbcType=TIMESTAMP},
333 334
      </if>
      <if test="invoiceTaxAmount != null">
neo's avatar
neo committed
335
        INVOICE_TAX_AMOUNT = #{invoiceTaxAmount,jdbcType=DECIMAL},
336 337
      </if>
      <if test="invoiceAmount != null">
neo's avatar
neo committed
338 339 340 341
        INVOICE_AMOUNT = #{invoiceAmount,jdbcType=DECIMAL},
      </if>
      <if test="auditResult != null">
        AUDIT_RESULT = #{auditResult,jdbcType=VARCHAR},
342 343
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
344
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
345 346
      </if>
      <if test="periodId != null">
neo's avatar
neo committed
347
        PERIOD_ID = #{periodId,jdbcType=DECIMAL},
348
      </if>
neo's avatar
neo committed
349 350
      <if test="creatorId != null">
        CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
351 352
      </if>
      <if test="status != null">
neo's avatar
neo committed
353
        "STATUS" = #{status,jdbcType=DECIMAL},
354 355
      </if>
      <if test="partAccntedPeriod != null">
neo's avatar
neo committed
356
        PART_ACCNTED_PERIOD = #{partAccntedPeriod,jdbcType=DECIMAL},
357 358
      </if>
      <if test="accntedPeriod != null">
neo's avatar
neo committed
359
        ACCNTED_PERIOD = #{accntedPeriod,jdbcType=DECIMAL},
360 361
      </if>
    </set>
neo's avatar
neo committed
362
    where CUSTOMS_ID = #{customsId,jdbcType=VARCHAR}
363 364 365 366 367 368
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
369 370 371 372 373 374 375 376 377 378 379 380 381
    update CUSTOMS_INVOICE
    set PAY_NUM = #{payNum,jdbcType=VARCHAR},
      ISSUE_DATE = #{issueDate,jdbcType=TIMESTAMP},
      INVOICE_TAX_AMOUNT = #{invoiceTaxAmount,jdbcType=DECIMAL},
      INVOICE_AMOUNT = #{invoiceAmount,jdbcType=DECIMAL},
      AUDIT_RESULT = #{auditResult,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      PERIOD_ID = #{periodId,jdbcType=DECIMAL},
      CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
      "STATUS" = #{status,jdbcType=DECIMAL},
      PART_ACCNTED_PERIOD = #{partAccntedPeriod,jdbcType=DECIMAL},
      ACCNTED_PERIOD = #{accntedPeriod,jdbcType=DECIMAL}
    where CUSTOMS_ID = #{customsId,jdbcType=VARCHAR}
382 383 384 385 386 387 388 389 390 391 392
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.CustomsInvoiceExample" 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
393
    from CUSTOMS_INVOICE
394 395 396 397 398 399 400
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
401
</mapper>