|
@@ -30,44 +30,82 @@
|
|
|
#{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
- <resultMap id="BaseSearchMap" type="com.simuwang.base.pojo.vo.EmailFundNavAssetVO">
|
|
|
- <id column="id" property="id"/>
|
|
|
- <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="asset_net" property="assetNet"/>
|
|
|
- <result column="asset_share" property="assetShare"/>
|
|
|
- <result column="is_stored" property="isStored"/>
|
|
|
- <result column="exception_status" property="exceptionStatus"/>
|
|
|
- <result column="target_fund_id" property="targetFundId"/>
|
|
|
- <result column="target_fund_name" property="targetFundName"/>
|
|
|
- </resultMap>
|
|
|
- <select id="searchNavDetail" resultType="com.simuwang.base.pojo.vo.EmailFundNavAssetVO">
|
|
|
+ <select id="searchNavDetail" resultMap="BaseResultMap">
|
|
|
SELECT distinct
|
|
|
- IFNULL(nav.fund_id,asset.fund_id) as fund_id,
|
|
|
- IFNULL(nav.fund_name,asset.fund_name) as fund_name,
|
|
|
- IFNULL(nav.register_number,asset.register_number) as register_number,
|
|
|
- IFNULL(nav.price_date,asset.price_date) as price_date,
|
|
|
+ nav.fund_id,
|
|
|
+ nav.fund_name,
|
|
|
+ nav.register_number,
|
|
|
+ nav.price_date,
|
|
|
nav.nav,
|
|
|
nav.cumulative_nav_withdrawal,
|
|
|
nav.exception_status,
|
|
|
nav.is_stored,
|
|
|
- asset.asset_net,
|
|
|
- asset.asset_share,
|
|
|
+ nav.updatetime
|
|
|
FROM
|
|
|
- PPW_EMAIL.EMAIL_FILE_INFO efi
|
|
|
- LEFT JOIN PPW_EMAIL.email_fund_nav nav
|
|
|
- ON efi.id = nav.file_id
|
|
|
- AND nav.isvalid = 1
|
|
|
- LEFT JOIN PPW_EMAIL.email_fund_asset asset
|
|
|
- ON efi.id = asset.file_id
|
|
|
- AND asset.isvalid = 1 AND (nav.fund_id=asset.fund_id OR nav.register_number=asset.register_number OR nav.fund_name= asset.fund_name) AND nav.price_date=asset.price_date
|
|
|
- WHERE efi.isvalid = 1
|
|
|
- AND efi.id =#{fileId}
|
|
|
- order by fund_name desc,price_date desc
|
|
|
+ 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.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>
|
|
|
|
|
|
|