|
@@ -27,14 +27,15 @@
|
|
|
<result column="updatetime" property="updateTime"/>
|
|
|
<result column="isvalid" property="isvalid"/>
|
|
|
</resultMap>
|
|
|
- <select id="searchFundInfoByKeyword" resultType="java.util.Map" parameterType="java.lang.String">
|
|
|
- select f.fund_id as fundId,
|
|
|
- f.fund_short_name as fundShortName,
|
|
|
- f.register_number as registerNumber
|
|
|
+ <select id="searchFundInfoByKeyword" resultType="java.util.Map">
|
|
|
+ select f.fund_id as "fundId",
|
|
|
+ f.fund_short_name as "fundShortName",
|
|
|
+ f.register_number as "registerNumber"
|
|
|
from PPW_EMAIL.pvn_fund_info f where f.isvalid =1
|
|
|
<if test="keyword != null and keyword !=''">
|
|
|
and (f.fund_name like concat('%',#{keyword},'%') or f.fund_short_name like concat('%',#{keyword},'%') or f.register_number like concat('%',#{keyword},'%'))
|
|
|
</if>
|
|
|
+ limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
<select id="searchFundInfoList" resultType="com.simuwang.base.pojo.vo.FundInformationVO">
|
|
|
select f.fund_id as fundId,
|
|
@@ -54,11 +55,11 @@
|
|
|
<if test="fundId != null and fundId !=''">
|
|
|
and f.fund_id like concat('%',#{fundId},'%')
|
|
|
</if>
|
|
|
- <if test="fundName != null and fundName !=''">
|
|
|
- and (f.fund_name like concat('%',#{fundName},'%') or f.fund_short_name like concat('%',#{fundName},'%'))
|
|
|
+ <if test="fundShortName != null and fundShortName !=''">
|
|
|
+ and (f.fund_name like concat('%',#{fundShortName},'%') or f.fund_short_name like concat('%',#{fundShortName},'%'))
|
|
|
</if>
|
|
|
- <if test="companyName != null and companyName !=''">
|
|
|
- and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
|
|
|
+ <if test="companyShortName != null and companyShortName !=''">
|
|
|
+ and (c.company_name like concat('%',#{companyShortName},'%') or c.company_short_name like concat('%',#{companyShortName},'%'))
|
|
|
</if>
|
|
|
<if test="navFrequency != null and navFrequency !=''">
|
|
|
and r.nav_frequency = #{navFrequency}
|
|
@@ -72,6 +73,7 @@
|
|
|
<if test="endDate != null and endDate !=''">
|
|
|
and r.inception_date <![CDATA[ <= ]]> #{endDate}
|
|
|
</if>
|
|
|
+ limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<select id="queryFundByNameAndRegisterNumber" resultType="com.simuwang.base.pojo.dos.FundInfoDO">
|
|
@@ -101,5 +103,44 @@
|
|
|
where isvalid = 1
|
|
|
and register_number = #{registerNumber}
|
|
|
</select>
|
|
|
+ <select id="countFundInfoByKeyword" resultType="java.lang.Long"
|
|
|
+ parameterType="com.simuwang.base.pojo.dto.query.FundInputPageQuery">
|
|
|
+ select count(f.fund_id)
|
|
|
+ from PPW_EMAIL.pvn_fund_info f where f.isvalid =1
|
|
|
+ <if test="keyword != null and keyword !=''">
|
|
|
+ and (f.fund_name like concat('%',#{keyword},'%') or f.fund_short_name like concat('%',#{keyword},'%') or f.register_number like concat('%',#{keyword},'%'))
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="countFundInfo" resultType="java.lang.Long"
|
|
|
+ parameterType="com.simuwang.base.pojo.dto.query.FundInfoPageQuery">
|
|
|
+ select count(f.fund_id)
|
|
|
+ from PPW_EMAIL.pvn_fund_info f
|
|
|
+ join PPW_EMAIL.pvn_company_info c on f.trust_id = c.company_id
|
|
|
+ left join (select nv.fund_id,max(nv.price_date) as last_price_date from PPW_EMAIL.nav nv where nv.isvalid =1 group by nv.fund_id) n
|
|
|
+ on f.fund_id = n .fund_id
|
|
|
+ left join PPW_EMAIL.fund_report_frequency r on r.fund_id = f.fund_id and r.isvalid =1
|
|
|
+ where f.isvalid =1 and c.isvalid =1
|
|
|
+ <if test="fundId != null and fundId !=''">
|
|
|
+ and f.fund_id like concat('%',#{fundId},'%')
|
|
|
+ </if>
|
|
|
+ <if test="fundShortName != null and fundShortName !=''">
|
|
|
+ and (f.fund_name like concat('%',#{fundShortName},'%') or f.fund_short_name like concat('%',#{fundShortName},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="companyShortName != null and companyShortName !=''">
|
|
|
+ and (c.company_name like concat('%',#{companyShortName},'%') or c.company_short_name like concat('%',#{companyShortName},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="navFrequency != null and navFrequency !=''">
|
|
|
+ and r.nav_frequency = #{navFrequency}
|
|
|
+ </if>
|
|
|
+ <if test="assetFrequency != null and assetFrequency !=''">
|
|
|
+ and r.asset_Frequency = #{navFrequency}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate !=''">
|
|
|
+ and r.inception_date <![CDATA[ >= ]]> #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate !=''">
|
|
|
+ and r.inception_date <![CDATA[ <= ]]> #{endDate}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|