|
@@ -0,0 +1,77 @@
|
|
|
|
+<?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.FundInfomationMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.FundInformationDO">
|
|
|
|
+ <id column="id" property="id"/>
|
|
|
|
+ <result column="p_fund_id" property="pFundId"/>
|
|
|
|
+ <result column="fund_name" property="fundName"/>
|
|
|
|
+ <result column="fund_short_name" property="fundShortName"/>
|
|
|
|
+ <result column="fund_type" property="fundType"/>
|
|
|
|
+ <result column="manager_type" property="managerType"/>
|
|
|
|
+ <result column="base_currency" property="baseCurrency"/>
|
|
|
|
+ <result column="inception_date" property="inceptionDate"/>
|
|
|
|
+ <result column="advisor_id" property="advisorId"/>
|
|
|
|
+ <result column="issuer_id" property="issuerId"/>
|
|
|
|
+ <result column="custodian_id" property="custodianId"/>
|
|
|
|
+ <result column="register_number" property="registerNumber"/>
|
|
|
|
+ <result column="register_date" property="registerDate"/>
|
|
|
|
+ <result column="is_amac_show" property="isAmacShow"/>
|
|
|
|
+ <result column="fund_status" property="fundStatus"/>
|
|
|
|
+ <result column="amac_source_type" property="amacSourceType"/>
|
|
|
|
+ <result column="investment_type" property="investmentType"/>
|
|
|
|
+ <result column="liquidate_date" property="liquidateDate"/>
|
|
|
|
+ <result column="performance_start_date" property="performanceStartDate"/>
|
|
|
|
+ <result column="is_shareclass" property="isShareclass"/>
|
|
|
|
+ <result column="trust_id" property="trustId"/>
|
|
|
|
+ <result column="createtime" property="createTime"/>
|
|
|
|
+ <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
|
|
|
|
+ from PPW_EMAIL.fund_information 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="searchFundInfoList" resultType="com.simuwang.base.pojo.vo.FundInformationVO">
|
|
|
|
+ select f.fund_id as fundId,
|
|
|
|
+ f.fund_short_name as fundShortName,
|
|
|
|
+ c.company_short_name as companyShortName,
|
|
|
|
+ f.inception_date as inceptionDate,
|
|
|
|
+ n.last_price_date as lastPriceDate,
|
|
|
|
+ r.nav_frequency as navFrequency,
|
|
|
|
+ r.asset_Frequency as assetFrequency,
|
|
|
|
+ r.frequency_remark as frequencyRemark
|
|
|
|
+ from PPW_EMAIL.fund_information f
|
|
|
|
+ join PPW_EMAIL.company_information 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 = #{fundId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fundName != null and fundName !=''">
|
|
|
|
+ and (f.fund_name = #{fundName} or f.fund_short_name =#{fundName})
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyName != null and companyName !=''">
|
|
|
|
+ and (c.company_name = #{companyName} or c.company_short_name =#{companyName})
|
|
|
|
+ </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>
|