|
@@ -101,35 +101,15 @@
|
|
|
<select id="countNavTotal" resultType="java.lang.Long">
|
|
|
select count(1) from nav where isvalid=1
|
|
|
</select>
|
|
|
- <select id="countNavByTime" resultType="java.lang.Long">
|
|
|
- select count(1) from nav where updatetime <![CDATA[ <= ]]> #{endDate}
|
|
|
- <if test="startDate != null and startDate !=''">
|
|
|
- and updatetime >= #{startDate}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectNavListByTime" resultMap="BaseResultMap">
|
|
|
- select id,fund_id,price_date,nav,cumulative_nav,cumulative_nav_withdrawal,
|
|
|
+
|
|
|
+ <select id="queryNavByFundIdDate" resultMap="BaseResultMap">
|
|
|
+ SELECT id, fund_id,price_date,nav,cumulative_nav,cumulative_nav_withdrawal,
|
|
|
isvalid, creatorid, createtime, updaterid, updatetime
|
|
|
- from nav where updatetime <![CDATA[ <= ]]> #{endDate}
|
|
|
- <if test="startDate != null and startDate !=''">
|
|
|
- and updatetime >= #{startDate}
|
|
|
- </if>
|
|
|
- order by updatetime desc
|
|
|
- </select>
|
|
|
- <select id="selectMaxMinId" resultType="java.util.Map">
|
|
|
- select max(id) as maxId,min(id) as minId from nav where updatetime <![CDATA[ <= ]]> #{endDate}
|
|
|
- <if test="startDate != null and startDate !=''">
|
|
|
- and updatetime >= #{startDate}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectNavListById" resultType="com.simuwang.base.pojo.dos.NavDO">
|
|
|
- select id,fund_id,price_date,nav,cumulative_nav,cumulative_nav_withdrawal,
|
|
|
- isvalid, creatorid, createtime, updaterid, updatetime
|
|
|
- from nav where updatetime <![CDATA[ <= ]]> #{endDate} and id >= #{minId} and id <![CDATA[ <= ]]> #{maxId}
|
|
|
- <if test="startDate != null and startDate !=''">
|
|
|
- and updatetime >= #{startDate}
|
|
|
- </if>
|
|
|
- order by updatetime desc
|
|
|
+ from nav
|
|
|
+ where isvalid = 1
|
|
|
+ and fund_id = #{fundId} and price_date <![CDATA[ <= ]]> #{priceDate}
|
|
|
+ order by price_date desc
|
|
|
+ limit 1
|
|
|
</select>
|
|
|
|
|
|
|