|
@@ -8,6 +8,7 @@
|
|
|
<result column="target_fund_id" property="targetFundId"/>
|
|
|
<result column="target_fund_name" property="targetFundName"/>
|
|
|
<result column="target_register_number" property="targetRegisterNumber"/>
|
|
|
+ <result column="last_price_date" property="lastPriceDate"/>
|
|
|
<result column="company_name" property="companyName"/>
|
|
|
<result column="isvalid" property="isvalid"/>
|
|
|
<result column="creatorid" property="creatorId"/>
|
|
@@ -91,6 +92,7 @@
|
|
|
info.fund_name as target_fund_name,
|
|
|
info.register_number as target_register_number,
|
|
|
c.company_name as company_name,
|
|
|
+ a.last_price_date as last_price_date,
|
|
|
alias.isvalid,
|
|
|
alias.creatorid,
|
|
|
alias.createtime,
|
|
@@ -101,6 +103,9 @@
|
|
|
on alias.target_fund_id = info.fund_id and info.isvalid=1
|
|
|
left join PPW_EMAIL.pvn_company_info c
|
|
|
on c.company_id = info.trust_id and c.isvalid=1
|
|
|
+ left join (select c.fund_name,c.register_number,max(c.price_date) as last_price_date from PPW_EMAIL.email_fund_nav c where c.isvalid=1
|
|
|
+ group by c.fund_name,c.register_number) a
|
|
|
+ on a.fund_name = alias.source_fund_name and a.register_number=alias.source_register_number
|
|
|
where alias.isvalid=1
|
|
|
<if test="fundName != null and fundName !=''">
|
|
|
and (alias.source_fund_name like concat('%',#{fundName},'%') or alias.source_register_number like concat('%',#{fundName},'%') )
|
|
@@ -114,7 +119,14 @@
|
|
|
<if test="isMapping != null and isMapping == 1">
|
|
|
and alias.target_fund_id is not null
|
|
|
</if>
|
|
|
- order by alias.updatetime desc
|
|
|
+ <choose>
|
|
|
+ <when test="sort != null and sort !='' and sort=='priceDate' and order != null and order !=''">
|
|
|
+ order by a.last_price_date ${order}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ order by a.last_price_date desc
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
<select id="countFundAlias" resultType="java.lang.Long"
|