IfaImportedNonavFundMapper.xml 24.2 KB
Newer Older
张亚辉's avatar
张亚辉 committed
1 2 3 4 5
<?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="com.tanpu.fund.mapper.generator.IfaImportedNonavFundMapper">
  <resultMap id="BaseResultMap" type="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
    <!--@mbg.generated-->
zp's avatar
zp committed
6
    <!--@Table ifa_imported_nonav_fund-->
张亚辉's avatar
张亚辉 committed
7 8 9
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="fund_name" jdbcType="VARCHAR" property="fundName" />
    <result column="start_end_date" jdbcType="VARCHAR" property="startEndDate" />
zp's avatar
zp committed
10 11
    <result column="summary" jdbcType="LONGVARCHAR" property="summary" />
    <result column="detail" jdbcType="LONGVARCHAR" property="detail" />
张亚辉's avatar
张亚辉 committed
12 13 14 15 16 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 45 46 47 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 80 81
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="delete_tag" jdbcType="INTEGER" property="deleteTag" />
    <result column="ifa_id" jdbcType="VARCHAR" property="ifaId" />
    <result column="org_id" jdbcType="VARCHAR" property="orgId" />
    <result column="fund_file" jdbcType="LONGVARCHAR" property="fundFile" />
    <result column="fund_png" jdbcType="LONGVARCHAR" property="fundPng" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--@mbg.generated-->
    <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>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--@mbg.generated-->
    <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>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
张亚辉's avatar
张亚辉 committed
82
    id, fund_name, start_end_date, summary, detail, create_time, update_time, delete_tag,
zp's avatar
zp committed
83
    ifa_id, org_id, fund_file, fund_png
张亚辉's avatar
张亚辉 committed
84 85 86 87 88 89 90 91
  </sql>
  <select id="selectByExample" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFundExample" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
zp's avatar
zp committed
92
    from ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
93 94 95 96 97 98 99
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
zp's avatar
zp committed
100
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
张亚辉's avatar
张亚辉 committed
101
    <!--@mbg.generated-->
张亚辉's avatar
张亚辉 committed
102
    select
张亚辉's avatar
张亚辉 committed
103
    <include refid="Base_Column_List" />
zp's avatar
zp committed
104
    from ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
105 106 107 108
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--@mbg.generated-->
zp's avatar
zp committed
109
    delete from ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
110 111 112 113
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFundExample">
    <!--@mbg.generated-->
zp's avatar
zp committed
114
    delete from ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
115 116 117 118 119 120
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
    <!--@mbg.generated-->
张亚辉's avatar
张亚辉 committed
121 122 123
    insert into ifa_imported_nonav_fund (id, fund_name, start_end_date,
      summary, detail, create_time,
      update_time, delete_tag, ifa_id,
zp's avatar
zp committed
124
      org_id, fund_file, fund_png
张亚辉's avatar
张亚辉 committed
125
      )
张亚辉's avatar
张亚辉 committed
126 127 128
    values (#{id,jdbcType=VARCHAR}, #{fundName,jdbcType=VARCHAR}, #{startEndDate,jdbcType=VARCHAR},
      #{summary,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{createTime,jdbcType=TIMESTAMP},
      #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER}, #{ifaId,jdbcType=VARCHAR},
zp's avatar
zp committed
129
      #{orgId,jdbcType=VARCHAR}, #{fundFile,jdbcType=LONGVARCHAR}, #{fundPng,jdbcType=LONGVARCHAR}
张亚辉's avatar
张亚辉 committed
130 131 132 133
      )
  </insert>
  <insert id="insertSelective" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
    <!--@mbg.generated-->
zp's avatar
zp committed
134
    insert into ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
135 136 137 138 139 140 141 142 143 144
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="fundName != null">
        fund_name,
      </if>
      <if test="startEndDate != null">
        start_end_date,
      </if>
zp's avatar
zp committed
145 146 147 148 149 150
      <if test="summary != null">
        summary,
      </if>
      <if test="detail != null">
        detail,
      </if>
张亚辉's avatar
张亚辉 committed
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="deleteTag != null">
        delete_tag,
      </if>
      <if test="ifaId != null">
        ifa_id,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="fundFile != null">
        fund_file,
      </if>
      <if test="fundPng != null">
        fund_png,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="fundName != null">
        #{fundName,jdbcType=VARCHAR},
      </if>
      <if test="startEndDate != null">
        #{startEndDate,jdbcType=VARCHAR},
      </if>
zp's avatar
zp committed
183 184 185 186 187 188
      <if test="summary != null">
        #{summary,jdbcType=LONGVARCHAR},
      </if>
      <if test="detail != null">
        #{detail,jdbcType=LONGVARCHAR},
      </if>
张亚辉's avatar
张亚辉 committed
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteTag != null">
        #{deleteTag,jdbcType=INTEGER},
      </if>
      <if test="ifaId != null">
        #{ifaId,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="fundFile != null">
        #{fundFile,jdbcType=LONGVARCHAR},
      </if>
      <if test="fundPng != null">
        #{fundPng,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFundExample" resultType="java.lang.Long">
    <!--@mbg.generated-->
zp's avatar
zp committed
214
    select count(*) from ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
215 216 217 218 219 220
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--@mbg.generated-->
zp's avatar
zp committed
221
    update ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
222 223 224 225 226 227 228 229 230 231
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.fundName != null">
        fund_name = #{record.fundName,jdbcType=VARCHAR},
      </if>
      <if test="record.startEndDate != null">
        start_end_date = #{record.startEndDate,jdbcType=VARCHAR},
      </if>
zp's avatar
zp committed
232 233 234 235 236 237
      <if test="record.summary != null">
        summary = #{record.summary,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.detail != null">
        detail = #{record.detail,jdbcType=LONGVARCHAR},
      </if>
张亚辉's avatar
张亚辉 committed
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
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.deleteTag != null">
        delete_tag = #{record.deleteTag,jdbcType=INTEGER},
      </if>
      <if test="record.ifaId != null">
        ifa_id = #{record.ifaId,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=VARCHAR},
      </if>
      <if test="record.fundFile != null">
        fund_file = #{record.fundFile,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.fundPng != null">
        fund_png = #{record.fundPng,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
zp's avatar
zp committed
264
  <update id="updateByExample" parameterType="map">
张亚辉's avatar
张亚辉 committed
265
    <!--@mbg.generated-->
zp's avatar
zp committed
266
    update ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
267 268 269
    set id = #{record.id,jdbcType=VARCHAR},
      fund_name = #{record.fundName,jdbcType=VARCHAR},
      start_end_date = #{record.startEndDate,jdbcType=VARCHAR},
zp's avatar
zp committed
270 271
      summary = #{record.summary,jdbcType=LONGVARCHAR},
      detail = #{record.detail,jdbcType=LONGVARCHAR},
张亚辉's avatar
张亚辉 committed
272 273 274 275 276 277 278 279 280 281 282 283 284
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      delete_tag = #{record.deleteTag,jdbcType=INTEGER},
      ifa_id = #{record.ifaId,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=VARCHAR},
      fund_file = #{record.fundFile,jdbcType=LONGVARCHAR},
      fund_png = #{record.fundPng,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
    <!--@mbg.generated-->
zp's avatar
zp committed
285
    update ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
286 287 288 289 290 291 292
    <set>
      <if test="fundName != null">
        fund_name = #{fundName,jdbcType=VARCHAR},
      </if>
      <if test="startEndDate != null">
        start_end_date = #{startEndDate,jdbcType=VARCHAR},
      </if>
zp's avatar
zp committed
293 294 295 296 297 298
      <if test="summary != null">
        summary = #{summary,jdbcType=LONGVARCHAR},
      </if>
      <if test="detail != null">
        detail = #{detail,jdbcType=LONGVARCHAR},
      </if>
张亚辉's avatar
张亚辉 committed
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteTag != null">
        delete_tag = #{deleteTag,jdbcType=INTEGER},
      </if>
      <if test="ifaId != null">
        ifa_id = #{ifaId,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="fundFile != null">
        fund_file = #{fundFile,jdbcType=LONGVARCHAR},
      </if>
      <if test="fundPng != null">
        fund_png = #{fundPng,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
zp's avatar
zp committed
323
  <update id="updateByPrimaryKey" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
张亚辉's avatar
张亚辉 committed
324
    <!--@mbg.generated-->
zp's avatar
zp committed
325
    update ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
326 327
    set fund_name = #{fundName,jdbcType=VARCHAR},
      start_end_date = #{startEndDate,jdbcType=VARCHAR},
zp's avatar
zp committed
328 329
      summary = #{summary,jdbcType=LONGVARCHAR},
      detail = #{detail,jdbcType=LONGVARCHAR},
张亚辉's avatar
张亚辉 committed
330 331 332 333 334 335 336 337 338 339 340
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      delete_tag = #{deleteTag,jdbcType=INTEGER},
      ifa_id = #{ifaId,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=VARCHAR},
      fund_file = #{fundFile,jdbcType=LONGVARCHAR},
      fund_png = #{fundPng,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateBatch" parameterType="java.util.List">
    <!--@mbg.generated-->
zp's avatar
zp committed
341
    update ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
342 343 344 345 346 347 348 349 350 351 352
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="fund_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.fundName,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="start_end_date = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.startEndDate,jdbcType=VARCHAR}
        </foreach>
      </trim>
zp's avatar
zp committed
353 354 355 356 357 358 359 360 361 362
      <trim prefix="summary = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.summary,jdbcType=LONGVARCHAR}
        </foreach>
      </trim>
      <trim prefix="detail = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.detail,jdbcType=LONGVARCHAR}
        </foreach>
      </trim>
张亚辉's avatar
张亚辉 committed
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
      <trim prefix="create_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="update_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="delete_tag = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="ifa_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.ifaId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="org_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.orgId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="fund_file = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.fundFile,jdbcType=LONGVARCHAR}
        </foreach>
      </trim>
      <trim prefix="fund_png = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=VARCHAR} then #{item.fundPng,jdbcType=LONGVARCHAR}
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=VARCHAR}
    </foreach>
  </update>
  <update id="updateBatchSelective" parameterType="java.util.List">
    <!--@mbg.generated-->
zp's avatar
zp committed
406
    update ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="fund_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.fundName != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.fundName,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="start_end_date = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.startEndDate != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.startEndDate,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
zp's avatar
zp committed
422 423 424 425 426 427 428 429 430 431 432 433 434 435
      <trim prefix="summary = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.summary != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.summary,jdbcType=LONGVARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="detail = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.detail != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.detail,jdbcType=LONGVARCHAR}
          </if>
        </foreach>
      </trim>
张亚辉's avatar
张亚辉 committed
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
      <trim prefix="create_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.createTime != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="update_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.updateTime != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="delete_tag = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.deleteTag != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER}
          </if>
        </foreach>
      </trim>
      <trim prefix="ifa_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.ifaId != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.ifaId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="org_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.orgId != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.orgId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="fund_file = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.fundFile != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.fundFile,jdbcType=LONGVARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="fund_png = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.fundPng != null">
            when id = #{item.id,jdbcType=VARCHAR} then #{item.fundPng,jdbcType=LONGVARCHAR}
          </if>
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=VARCHAR}
    </foreach>
  </update>
  <insert id="batchInsert" parameterType="map">
    <!--@mbg.generated-->
zp's avatar
zp committed
493
    insert into ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
494
    (id, fund_name, start_end_date, summary, detail, create_time, update_time, delete_tag,
zp's avatar
zp committed
495
      ifa_id, org_id, fund_file, fund_png)
张亚辉's avatar
张亚辉 committed
496 497
    values
    <foreach collection="list" item="item" separator=",">
张亚辉's avatar
张亚辉 committed
498 499 500
      (#{item.id,jdbcType=VARCHAR}, #{item.fundName,jdbcType=VARCHAR}, #{item.startEndDate,jdbcType=VARCHAR},
        #{item.summary,jdbcType=LONGVARCHAR}, #{item.detail,jdbcType=LONGVARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
        #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteTag,jdbcType=INTEGER}, #{item.ifaId,jdbcType=VARCHAR},
zp's avatar
zp committed
501
        #{item.orgId,jdbcType=VARCHAR}, #{item.fundFile,jdbcType=LONGVARCHAR}, #{item.fundPng,jdbcType=LONGVARCHAR}
张亚辉's avatar
张亚辉 committed
502 503 504 505 506
        )
    </foreach>
  </insert>
  <insert id="insertOrUpdate" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
    <!--@mbg.generated-->
zp's avatar
zp committed
507
    insert into ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
508
    (id, fund_name, start_end_date, summary, detail, create_time, update_time, delete_tag,
zp's avatar
zp committed
509
      ifa_id, org_id, fund_file, fund_png)
张亚辉's avatar
张亚辉 committed
510
    values
张亚辉's avatar
张亚辉 committed
511 512 513
    (#{id,jdbcType=VARCHAR}, #{fundName,jdbcType=VARCHAR}, #{startEndDate,jdbcType=VARCHAR},
      #{summary,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{createTime,jdbcType=TIMESTAMP},
      #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER}, #{ifaId,jdbcType=VARCHAR},
zp's avatar
zp committed
514
      #{orgId,jdbcType=VARCHAR}, #{fundFile,jdbcType=LONGVARCHAR}, #{fundPng,jdbcType=LONGVARCHAR}
张亚辉's avatar
张亚辉 committed
515
      )
张亚辉's avatar
张亚辉 committed
516 517 518 519 520 521 522 523 524 525 526 527
    on duplicate key update
    id = #{id,jdbcType=VARCHAR},
    fund_name = #{fundName,jdbcType=VARCHAR},
    start_end_date = #{startEndDate,jdbcType=VARCHAR},
    summary = #{summary,jdbcType=LONGVARCHAR},
    detail = #{detail,jdbcType=LONGVARCHAR},
    create_time = #{createTime,jdbcType=TIMESTAMP},
    update_time = #{updateTime,jdbcType=TIMESTAMP},
    delete_tag = #{deleteTag,jdbcType=INTEGER},
    ifa_id = #{ifaId,jdbcType=VARCHAR},
    org_id = #{orgId,jdbcType=VARCHAR},
    fund_file = #{fundFile,jdbcType=LONGVARCHAR},
张亚辉's avatar
张亚辉 committed
528 529 530 531
    fund_png = #{fundPng,jdbcType=LONGVARCHAR}
  </insert>
  <insert id="insertOrUpdateSelective" parameterType="com.tanpu.fund.entity.generator.IfaImportedNonavFund">
    <!--@mbg.generated-->
zp's avatar
zp committed
532
    insert into ifa_imported_nonav_fund
张亚辉's avatar
张亚辉 committed
533 534 535 536 537 538 539 540 541 542
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="fundName != null">
        fund_name,
      </if>
      <if test="startEndDate != null">
        start_end_date,
      </if>
zp's avatar
zp committed
543 544 545 546 547 548
      <if test="summary != null">
        summary,
      </if>
      <if test="detail != null">
        detail,
      </if>
张亚辉's avatar
张亚辉 committed
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="deleteTag != null">
        delete_tag,
      </if>
      <if test="ifaId != null">
        ifa_id,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="fundFile != null">
        fund_file,
      </if>
      <if test="fundPng != null">
        fund_png,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="fundName != null">
        #{fundName,jdbcType=VARCHAR},
      </if>
      <if test="startEndDate != null">
        #{startEndDate,jdbcType=VARCHAR},
      </if>
zp's avatar
zp committed
582 583 584 585 586 587
      <if test="summary != null">
        #{summary,jdbcType=LONGVARCHAR},
      </if>
      <if test="detail != null">
        #{detail,jdbcType=LONGVARCHAR},
      </if>
张亚辉's avatar
张亚辉 committed
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteTag != null">
        #{deleteTag,jdbcType=INTEGER},
      </if>
      <if test="ifaId != null">
        #{ifaId,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="fundFile != null">
        #{fundFile,jdbcType=LONGVARCHAR},
      </if>
      <if test="fundPng != null">
        #{fundPng,jdbcType=LONGVARCHAR},
      </if>
    </trim>
张亚辉's avatar
张亚辉 committed
610
    on duplicate key update
张亚辉's avatar
张亚辉 committed
611 612 613 614 615 616 617 618 619 620
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=VARCHAR},
      </if>
      <if test="fundName != null">
        fund_name = #{fundName,jdbcType=VARCHAR},
      </if>
      <if test="startEndDate != null">
        start_end_date = #{startEndDate,jdbcType=VARCHAR},
      </if>
zp's avatar
zp committed
621 622 623 624 625 626
      <if test="summary != null">
        summary = #{summary,jdbcType=LONGVARCHAR},
      </if>
      <if test="detail != null">
        detail = #{detail,jdbcType=LONGVARCHAR},
      </if>
张亚辉's avatar
张亚辉 committed
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteTag != null">
        delete_tag = #{deleteTag,jdbcType=INTEGER},
      </if>
      <if test="ifaId != null">
        ifa_id = #{ifaId,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="fundFile != null">
        fund_file = #{fundFile,jdbcType=LONGVARCHAR},
      </if>
      <if test="fundPng != null">
        fund_png = #{fundPng,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
张亚辉's avatar
张亚辉 committed
650
</mapper>