DepositNavDoMapper.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.smppw.analysis.infrastructure.persistence.DepositNavDoMapper">
  4. <resultMap id="BaseResultMap" type="com.smppw.analysis.domain.pojo.DepositNavDo">
  5. <!--@mbg.generated-->
  6. <!--@Table deposit_nav-->
  7. <id column="id" property="id" />
  8. <result column="fund_id" property="fundId" />
  9. <result column="price_date" property="priceDate" />
  10. <result column="nav" property="nav" />
  11. <result column="creatorid" property="creatorid" />
  12. <result column="createtime" property="createtime" />
  13. <result column="updaterid" property="updaterid" />
  14. <result column="updatetime" property="updatetime" />
  15. <result column="isvalid" property="isvalid" />
  16. </resultMap>
  17. <sql id="Base_Column_List">
  18. <!--@mbg.generated-->
  19. id, fund_id, price_date, nav, creatorid, createtime, updaterid, updatetime, isvalid
  20. </sql>
  21. <select id="listRiskOfFreeId" resultType="java.lang.String">
  22. select distinct fund_id from deposit_nav where isvalid = 1
  23. </select>
  24. <select id="listNavByTimeInterval" resultMap="BaseResultMap">
  25. select fund_id, price_date, nav
  26. <if test="needUpdateAndCreateTime">
  27. , updatetime, createtime
  28. </if>
  29. from deposit_nav where isvalid = 1
  30. <if test="startDate != null and startDate != ''">
  31. AND price_date &gt;= #{startDate}
  32. </if>
  33. <if test="endDate != null and endDate != ''">
  34. AND price_date &lt;= #{endDate}
  35. </if>
  36. AND fund_id in
  37. <foreach collection="indexIdList" item="indexId" index="index" open="(" separator="," close=")">
  38. #{indexId}
  39. </foreach>
  40. </select>
  41. </mapper>