123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?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.simuwang.base.mapper.EmailFundNavMapper">
- <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.EmailFundNavDO">
- <id column="id" property="id"/>
- <result column="file_id" property="fileId"/>
- <result column="fund_id" property="fundId"/>
- <result column="fund_name" property="fundName"/>
- <result column="register_number" property="registerNumber"/>
- <result column="price_date" property="priceDate"/>
- <result column="nav" property="nav"/>
- <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal"/>
- <result column="is_stored" property="isStored"/>
- <result column="exception_status" property="exceptionStatus"/>
- <result column="isvalid" property="isvalid"/>
- <result column="creatorid" property="creatorId"/>
- <result column="createtime" property="createTime"/>
- <result column="updaterid" property="updaterId"/>
- <result column="updatetime" property="updateTime"/>
- </resultMap>
- <insert id="batchInsert" parameterType="com.simuwang.base.pojo.dos.EmailFundNavDO">
- insert into PPW_EMAIL.email_fund_nav(file_id, fund_id, fund_name,register_number,price_date,
- nav,cumulative_nav_withdrawal,is_stored,exception_status,
- isvalid, creatorid, createtime, updaterid, updatetime)
- values
- <foreach collection="itemDoList" item="itemDo" index="index" separator=",">
- (#{itemDo.fileId},#{itemDo.fundId},#{itemDo.fundName},#{itemDo.registerNumber},#{itemDo.priceDate},
- #{itemDo.nav},#{itemDo.cumulativeNavWithdrawal},#{itemDo.isStored},#{itemDo.exceptionStatus},
- #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
- </foreach>
- </insert>
- <select id="searchNavDetail" resultMap="BaseResultMap">
- SELECT distinct nav.id,
- nav.fund_id,
- nav.fund_name,
- nav.register_number,
- nav.price_date,
- nav.nav,
- nav.cumulative_nav_withdrawal,
- nav.exception_status,
- nav.is_stored,
- nav.updatetime
- FROM
- PPW_EMAIL.email_fund_nav nav
- WHERE nav.isvalid = 1
- <if test="fundName != null and fundName !=''">
- and nav.fund_name like concat('%',#{fundName},'%')
- </if>
- <if test="priceStartDate != null and priceStartDate !=''">
- and nav.price_date >= #{priceStartDate}
- </if>
- <if test="priceEndDate != null and priceEndDate !=''">
- and nav.price_date <![CDATA[ <= ]]> #{priceEndDate}
- </if>
- <if test="exceptionStatus != null">
- and nav.exception_status = #{exceptionStatus}
- </if>
- <if test="updateStartDate != null and updateStartDate !=''">
- and nav.updatetime <![CDATA[ >= ]]> #{updateStartDate}
- </if>
- <if test="updateEndDate != null and updateEndDate !=''">
- and nav.updatetime <![CDATA[ <= ]]> #{updateEndDate}
- </if>
- <if test="isStore != null">
- and nav.is_stored = #{isStore}
- </if>
- order by nav.fund_name desc,nav.price_date desc
- limit #{offset},#{pageSize}
- </select>
- <select id="countNavDetail" resultType="java.lang.Long"
- parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
- select count(1) from (
- SELECT distinct nav.id,
- nav.fund_id,
- nav.fund_name,
- nav.register_number,
- nav.price_date,
- nav.nav,
- nav.cumulative_nav_withdrawal,
- nav.exception_status,
- nav.is_stored,
- nav.updatetime
- FROM
- PPW_EMAIL.email_fund_nav nav
- WHERE nav.isvalid = 1
- <if test="fundName != null and fundName !=''">
- and nav.fund_name like concat('%',#{fundName},'%')
- </if>
- <if test="priceStartDate != null and priceStartDate !=''">
- and nav.price_date >= #{priceStartDate}
- </if>
- <if test="priceEndDate != null and priceEndDate !=''">
- and nav.price_date <![CDATA[ <= ]]> #{priceEndDate}
- </if>
- <if test="exceptionStatus != null">
- and nav.exception_status = #{exceptionStatus}
- </if>
- <if test="updateStartDate != null and updateStartDate !=''">
- and nav.updatetime <![CDATA[ >= ]]> #{updateStartDate}
- </if>
- <if test="updateEndDate != null and updateEndDate !=''">
- and nav.updatetime <![CDATA[ <= ]]> #{updateEndDate}
- </if>
- <if test="isStore != null">
- and nav.is_stored = #{isStore}
- </if>
- ) a
- </select>
- </mapper>
|