VoucherMappingMapper.xml 11.8 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.VoucherMappingMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.VoucherMapping">
    <!--
      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
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="TRAN_CODE" jdbcType="VARCHAR" property="tranCode" />
    <result column="VID" jdbcType="VARCHAR" property="vid" />
    <result column="PERIOD" jdbcType="DECIMAL" property="period" />
    <result column="GROUP" jdbcType="VARCHAR" property="group" />
    <result column="ITEM_ID" jdbcType="VARCHAR" property="itemId" />
    <result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
17 18 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
  </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>
45
            </foreach>
46
          </trim>
47
        </if>
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
      </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>
80
        </if>
81 82 83 84 85 86 87 88
      </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
89
    ID, TRAN_CODE, VID, PERIOD, "GROUP", ITEM_ID, CREATOR_ID, CREATE_TIME
90 91 92 93 94 95 96 97 98 99 100
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherMappingExample" 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
101
    from VOUCHER_MAPPING
102 103 104 105 106 107 108 109 110 111 112 113 114 115
    <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
116 117
    from VOUCHER_MAPPING
    where ID = #{id,jdbcType=VARCHAR}
118 119 120 121 122 123
  </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
124 125
    delete from VOUCHER_MAPPING
    where ID = #{id,jdbcType=VARCHAR}
126 127 128 129 130 131
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherMappingExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
132
    delete from VOUCHER_MAPPING
133 134 135 136 137 138 139 140 141
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.VoucherMapping">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
142 143 144 145 146 147
    insert into VOUCHER_MAPPING (ID, TRAN_CODE, VID, 
      PERIOD, "GROUP", ITEM_ID, 
      CREATOR_ID, CREATE_TIME)
    values (#{id,jdbcType=VARCHAR}, #{tranCode,jdbcType=VARCHAR}, #{vid,jdbcType=VARCHAR}, 
      #{period,jdbcType=DECIMAL}, #{group,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR}, 
      #{creatorId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
148 149 150 151 152 153
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.VoucherMapping">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
154
    insert into VOUCHER_MAPPING
155
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
156
      <if test="id != null">
157 158 159
        ID,
      </if>
      <if test="tranCode != null">
neo's avatar
neo committed
160
        TRAN_CODE,
161
      </if>
neo's avatar
neo committed
162
      <if test="vid != null">
163 164 165
        VID,
      </if>
      <if test="period != null">
neo's avatar
neo committed
166
        PERIOD,
167 168
      </if>
      <if test="group != null">
neo's avatar
neo committed
169
        "GROUP",
170
      </if>
neo's avatar
neo committed
171 172
      <if test="itemId != null">
        ITEM_ID,
173
      </if>
neo's avatar
neo committed
174 175
      <if test="creatorId != null">
        CREATOR_ID,
176 177
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
178
        CREATE_TIME,
179 180 181
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
182 183
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
184 185 186 187
      </if>
      <if test="tranCode != null">
        #{tranCode,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
188 189
      <if test="vid != null">
        #{vid,jdbcType=VARCHAR},
190 191
      </if>
      <if test="period != null">
neo's avatar
neo committed
192
        #{period,jdbcType=DECIMAL},
193 194 195 196
      </if>
      <if test="group != null">
        #{group,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
197 198
      <if test="itemId != null">
        #{itemId,jdbcType=VARCHAR},
199
      </if>
neo's avatar
neo committed
200 201
      <if test="creatorId != null">
        #{creatorId,jdbcType=VARCHAR},
202 203 204 205 206 207 208 209 210 211 212
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherMappingExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
213
    select count(*) from VOUCHER_MAPPING
214 215 216 217 218 219 220 221 222
    <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
223
    update VOUCHER_MAPPING
224
    <set>
neo's avatar
neo committed
225 226
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
227 228
      </if>
      <if test="record.tranCode != null">
neo's avatar
neo committed
229
        TRAN_CODE = #{record.tranCode,jdbcType=VARCHAR},
230
      </if>
neo's avatar
neo committed
231 232
      <if test="record.vid != null">
        VID = #{record.vid,jdbcType=VARCHAR},
233 234
      </if>
      <if test="record.period != null">
neo's avatar
neo committed
235
        PERIOD = #{record.period,jdbcType=DECIMAL},
236 237
      </if>
      <if test="record.group != null">
neo's avatar
neo committed
238
        "GROUP" = #{record.group,jdbcType=VARCHAR},
239
      </if>
neo's avatar
neo committed
240 241
      <if test="record.itemId != null">
        ITEM_ID = #{record.itemId,jdbcType=VARCHAR},
242
      </if>
neo's avatar
neo committed
243 244
      <if test="record.creatorId != null">
        CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
245 246
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
247
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
248 249 250 251 252 253 254 255 256 257 258
      </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
259 260 261 262 263 264 265 266 267
    update VOUCHER_MAPPING
    set ID = #{record.id,jdbcType=VARCHAR},
      TRAN_CODE = #{record.tranCode,jdbcType=VARCHAR},
      VID = #{record.vid,jdbcType=VARCHAR},
      PERIOD = #{record.period,jdbcType=DECIMAL},
      "GROUP" = #{record.group,jdbcType=VARCHAR},
      ITEM_ID = #{record.itemId,jdbcType=VARCHAR},
      CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}
268 269 270 271 272 273 274 275 276
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.VoucherMapping">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
277
    update VOUCHER_MAPPING
278 279
    <set>
      <if test="tranCode != null">
neo's avatar
neo committed
280
        TRAN_CODE = #{tranCode,jdbcType=VARCHAR},
281
      </if>
neo's avatar
neo committed
282 283
      <if test="vid != null">
        VID = #{vid,jdbcType=VARCHAR},
284 285
      </if>
      <if test="period != null">
neo's avatar
neo committed
286
        PERIOD = #{period,jdbcType=DECIMAL},
287 288
      </if>
      <if test="group != null">
neo's avatar
neo committed
289
        "GROUP" = #{group,jdbcType=VARCHAR},
290
      </if>
neo's avatar
neo committed
291 292
      <if test="itemId != null">
        ITEM_ID = #{itemId,jdbcType=VARCHAR},
293
      </if>
neo's avatar
neo committed
294 295
      <if test="creatorId != null">
        CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
296 297
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
298
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
299 300
      </if>
    </set>
neo's avatar
neo committed
301
    where ID = #{id,jdbcType=VARCHAR}
302 303 304 305 306 307
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.VoucherMapping">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
308 309 310 311 312 313 314 315 316
    update VOUCHER_MAPPING
    set TRAN_CODE = #{tranCode,jdbcType=VARCHAR},
      VID = #{vid,jdbcType=VARCHAR},
      PERIOD = #{period,jdbcType=DECIMAL},
      "GROUP" = #{group,jdbcType=VARCHAR},
      ITEM_ID = #{itemId,jdbcType=VARCHAR},
      CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}
    where ID = #{id,jdbcType=VARCHAR}
317 318 319 320 321 322 323 324 325 326 327
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.VoucherMappingExample" 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
328
    from VOUCHER_MAPPING
329 330 331 332 333 334 335
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
336
</mapper>