12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?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.smppw.analysis.domain.persistence.NavDoMapper">
- <resultMap id="BaseResultMap" type="com.smppw.analysis.domain.dataobject.NavDo">
- <!--@mbg.generated-->
- <!--@Table nav-->
- <id column="id" property="id" />
- <result column="fund_id" property="fundId" />
- <result column="price_date" property="priceDate" />
- <result column="nav" property="nav" />
- <result column="cumulative_nav" property="cumulativeNav" />
- <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal" />
- <result column="ishigh_or_low" property="ishighOrLow" />
- <result column="tohigh_nav_ratio" property="tohighNavRatio" />
- <result column="creatorid" property="creatorid" />
- <result column="createtime" property="createtime" />
- <result column="updaterid" property="updaterid" />
- <result column="updatetime" property="updatetime" />
- <result column="isvalid" property="isvalid" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, fund_id, price_date, nav, cumulative_nav, cumulative_nav_withdrawal, ishigh_or_low,
- tohigh_nav_ratio, creatorid, createtime, updaterid, updatetime, isvalid
- </sql>
- <select id="listNavByTimeInterval" resultMap="BaseResultMap">
- select fund_id, price_date, ${navFieldSql}
- <if test="needUpdateAndCreateTime">
- , updatetime, createtime
- </if>
- from nav where isvalid = 1
- <if test="startDate != null and startDate != ''">
- AND price_date >= #{startDate}
- </if>
- <if test="endDate != null and endDate != ''">
- AND price_date <= #{endDate}
- </if>
- AND fund_id in
- <foreach collection="fundIdList" item="fundId" index="index" open="(" separator="," close=")">
- #{fundId}
- </foreach>
- </select>
- <select id="selectFundIdByStartTime" resultType="com.smppw.analysis.domain.dataobject.NavDo">
- select fund_id as fundId, updatetime as updatetime
- from nav
- where isvalid = 1
- AND updatetime > #{startTime}
- </select>
- </mapper>
|