|
@@ -185,28 +185,6 @@
|
|
|
is_amac_show
|
|
|
</sql>
|
|
|
|
|
|
- <select id="listFundIdByFundIdListAndVisibilityId" resultType="java.lang.String">
|
|
|
- select distinct fund_id
|
|
|
- from rz_hfdb_core.fund_information where is_nav_visible_org = #{visibilityId}
|
|
|
- AND isvalid = 1
|
|
|
- AND fund_id in
|
|
|
- <foreach collection="fundIdList" item="fundId" index="index" open="(" separator="," close=")">
|
|
|
- #{fundId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="listFundIdByFundIdsAndVisibilityIdForInvestAdvisor" resultType="java.lang.String">
|
|
|
- select distinct fund_id
|
|
|
- from rz_hfdb_core.fund_information
|
|
|
- where isvisible = 1
|
|
|
- and is_nav_visible = #{visibilityId}
|
|
|
- AND isvalid = 1
|
|
|
- AND fund_id in
|
|
|
- <foreach collection="fundIdList" item="fundId" index="index" open="(" separator="," close=")">
|
|
|
- #{fundId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="listFundInfo" resultMap="BaseResultMap">
|
|
|
select *
|
|
|
from rz_hfdb_core.fund_information where isvalid = 1
|
|
@@ -216,14 +194,6 @@
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
- <select id="getFundFrequency" resultType="java.util.Map">
|
|
|
- SELECT f.fund_id fundId, f.nav_frequency frequency, f.trust_id trustId
|
|
|
- FROM rz_hfdb_core.fund_information f WHERE f.isvalid = 1
|
|
|
- AND f.fund_id in
|
|
|
- <foreach collection="fundIds" index="index" item="fundId" open="(" close=")" separator=",">
|
|
|
- #{fundId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
<select id="getManagerFundFeature" resultType="java.util.Map">
|
|
|
SELECT ds.strategy_name, COUNT(t4.first_strategy) as countSum
|
|
|
FROM rz_hfdb_core.`fund_information` t1
|
|
@@ -246,109 +216,6 @@
|
|
|
and isvalid = 1
|
|
|
</select>
|
|
|
|
|
|
- <select id="getFundInfos" resultType="java.util.Map">
|
|
|
- SELECT fi.fund_id,
|
|
|
- fi.fund_name,
|
|
|
- fi.fund_short_name,
|
|
|
- date_format(fi.inception_date,'%Y-%m-%d') as inception_date,
|
|
|
- fi.is_nav_visible AS is_nav_visible,
|
|
|
- fi.isvisible AS is_visible,
|
|
|
- fi.is_nav_visible_org AS is_nav_visible_org,
|
|
|
- ci.company_id AS 'advisor_id',
|
|
|
- ci.company_name AS 'advisor_name',
|
|
|
- ci.company_short_name AS 'advisor_short_name',
|
|
|
- mi.manager_name,
|
|
|
- mi.manager_id
|
|
|
- FROM rz_hfdb_core.fund_information fi
|
|
|
- LEFT JOIN rz_hfdb_core.fund_manager_mapping fm ON fi.fund_id = fm.fund_id AND fm.isvalid = 1
|
|
|
- LEFT JOIN rz_hfdb_core.company_information ci ON ci.company_id = fi.trust_id AND ci.isvalid = 1
|
|
|
- LEFT JOIN rz_hfdb_core.personnel_mapping mi
|
|
|
- ON fm.fund_manager_id = mi.manager_id WHERE fi.isvalid = 1
|
|
|
- AND fi.fund_id in
|
|
|
- <foreach collection="fundIdList" item="fundId" index="index" open="(" separator="," close=")">
|
|
|
- #{fundId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="getFundRet" resultType="java.util.Map">
|
|
|
- SELECT p.fund_id,
|
|
|
- date_format(p.price_date,'%Y-%m-%d') as price_date,
|
|
|
- p.ret_incep,
|
|
|
- p.ret_incep_a,
|
|
|
- n.nav,
|
|
|
- p.cumulative_nav,
|
|
|
- p.ret_ytd,
|
|
|
- p.ret_ytd_a,
|
|
|
- p.ret_1m,
|
|
|
- p.ret_1m_a,
|
|
|
- p.ret_3m,
|
|
|
- p.ret_3m_a,
|
|
|
- p.ret_6m,
|
|
|
- p.ret_6m_a,
|
|
|
- p.ret_1y,
|
|
|
- p.ret_1y_a,
|
|
|
- p.ret_3y,
|
|
|
- p.ret_3y_a
|
|
|
- FROM rz_hfdb_core.fund_latest_nav_performance p
|
|
|
- LEFT JOIN rz_hfdb_core.nav n
|
|
|
- ON p.fund_id = n.fund_id AND p.price_date = n.price_date WHERE p.isvalid = 1
|
|
|
- AND p.fund_id IN
|
|
|
- <foreach collection="fundIdList" item="fundId" index="index" open="(" separator="," close=")">
|
|
|
- #{fundId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="getMaxFundEndDate" resultType="java.lang.String">
|
|
|
- SELECT max(price_date) AS 'end_date' FROM rz_hfdb_core.fund_latest_nav_performance p WHERE p.isvalid=1 AND p.fund_id IN
|
|
|
- <foreach collection="fundIdList" item="fundId" index="index" open="(" separator="," close=")">
|
|
|
- #{fundId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="listFundIdByCompanyId" resultType="java.lang.String">
|
|
|
- select t1.fund_id
|
|
|
- from fund_information t1
|
|
|
- left join company_information t2 on t1.trust_id = t2.company_id
|
|
|
- where t1.isvalid = 1
|
|
|
- and t2.company_id = #{companyId} and t2.isvalid=1
|
|
|
- order by t1.createtime
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="listCompanyIdByPersonnelId" resultType="java.lang.String">
|
|
|
- SELECT DISTINCT t2.company_id
|
|
|
- FROM rz_hfdb_core.personnel_company_position_mapping t1
|
|
|
- LEFT JOIN rz_hfdb_core.company_information t2
|
|
|
- ON t1.company_id = t2.company_id AND t2.isvalid = 1
|
|
|
- LEFT JOIN rz_hfdb_core.personnel_company_position_id_mapping t3
|
|
|
- ON t3.`isvalid`=1 AND t3.`rec_id`=t1.id
|
|
|
- LEFT JOIN rz_hfdb_core.d_position t4
|
|
|
- ON t3.position_id=t4.id AND t4.`isvalid`=1
|
|
|
- WHERE t1.isvalid = 1
|
|
|
- AND t4.position_name REGEXP '总经理|董事|CEO|CFO|COO|CIO|投资经理|合规负责人|合规风控|监事|总监|法定代表人|法人|合伙人|创始人|总裁|主管|法人代表|基金经理'
|
|
|
- and t1.personnel_id in
|
|
|
- <foreach collection="personnelIdList" item="personnelId" index="index" open="(" separator="," close=")">
|
|
|
- #{personnelId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
- <select id="listFundInfoByCompanyId" resultType="java.util.Map" parameterType="java.lang.String">
|
|
|
- select t1.fund_id as fundId,t1.fund_short_name as fundShortName,
|
|
|
- t1.register_number as registerNumber
|
|
|
- from fund_information t1
|
|
|
- left join company_information t2 on t1.trust_id = t2.company_id
|
|
|
- where t1.isvalid = 1
|
|
|
- and t2.company_id = #{companyId} and t2.isvalid=1
|
|
|
- order by t1.createtime
|
|
|
-
|
|
|
- </select>
|
|
|
- <select id="listFundRegisterNumber" resultType="java.util.Map">
|
|
|
- select fund_id as fundId,register_number as registerNumber
|
|
|
- from fund_information
|
|
|
- where isvalid = 1 and fund_id in
|
|
|
- <foreach collection="fundIdList" item="item" index="index" separator="," open="(" close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="getFundRankByCall" resultType="hashmap" parameterType="hashmap" statementType="CALLABLE">
|
|
|
CALL rz_hfdb_core.sp_get_fund_strategy_year_ret_pro(1,null,#{rankDate,mode=IN},#{fundId,mode=IN},#{indexIds,mode=IN},#{indicator,mode=IN},null)
|
|
|
</select>
|