12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?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.mapper.core.IndexesRzIndexMapper">
- <resultMap id="BaseResultMap" type="com.smppw.analysis.domain.dataobject.nav.IndexesRzIndexDo">
- <!--@mbg.generated-->
- <!--@Table indexes_rz_index-->
- <id column="id" property="id" />
- <result column="index_id" property="indexId" />
- <result column="index_code" property="indexCode" />
- <result column="end_date" property="endDate" />
- <result column="yearofweek" property="yearofweek" />
- <result column="weeks" property="weeks" />
- <result column="strategy" property="strategy" />
- <result column="substrategy" property="substrategy" />
- <result column="third_strategy" property="thirdStrategy" />
- <result column="last_index_value" property="lastIndexValue" />
- <result column="index_value" property="indexValue" />
- <result column="ret_1w" property="ret1w" />
- <result column="incl_cal_fund_count" property="inclCalFundCount" />
- <result column="total_fund_count" property="totalFundCount" />
- <result column="isstrategy" property="isstrategy" />
- <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, index_id, index_code, end_date, yearofweek, weeks, strategy, substrategy, third_strategy,
- last_index_value, index_value, ret_1w, incl_cal_fund_count, total_fund_count, isstrategy,
- creatorid, createtime, updaterid, updatetime, isvalid
- </sql>
- <select id="listNav" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from indexes_rz_index where isvalid = 1
- <if test="startDate != null and startDate != ''">
- AND end_date >= #{startDate}
- </if>
- <if test="endDate != null and endDate != ''">
- AND end_date <= #{endDate}
- </if>
- AND index_id in
- <foreach collection="indexIds" item="indexId" index="index" open="(" separator="," close=")">
- #{indexId}
- </foreach>
- </select>
- <select id="listNavByTimeInterval" resultMap="BaseResultMap">
- select index_id, end_date, index_value
- <if test="needUpdateAndCreateTime">
- , updatetime, createtime
- </if>
- from indexes_rz_index where isvalid = 1
- <if test="startDate != null and startDate != ''">
- AND end_date >= #{startDate}
- </if>
- <if test="endDate != null and endDate != ''">
- AND end_date <= #{endDate}
- </if>
- AND index_id in
- <foreach collection="indexIdList" item="indexId" index="index" open="(" separator="," close=")">
- #{indexId}
- </foreach>
- </select>
- <select id="isExist" resultType="java.lang.Integer">
- select count(id) from indexes_rz_index where index_id = #{indexId} and isvalid = 1
- </select>
- </mapper>
|