EmailFundNavMapper.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.simuwang.base.mapper.EmailFundNavMapper">
  4. <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.EmailFundNavDO">
  5. <id column="id" property="id"/>
  6. <result column="file_id" property="fileId"/>
  7. <result column="fund_id" property="fundId"/>
  8. <result column="fund_name" property="fundName"/>
  9. <result column="register_number" property="registerNumber"/>
  10. <result column="price_date" property="priceDate"/>
  11. <result column="nav" property="nav"/>
  12. <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal"/>
  13. <result column="is_stored" property="isStored"/>
  14. <result column="exception_status" property="exceptionStatus"/>
  15. <result column="isvalid" property="isvalid"/>
  16. <result column="creatorid" property="creatorId"/>
  17. <result column="createtime" property="createTime"/>
  18. <result column="updaterid" property="updaterId"/>
  19. <result column="updatetime" property="updateTime"/>
  20. </resultMap>
  21. <insert id="batchInsert" parameterType="com.simuwang.base.pojo.dos.EmailFundNavDO">
  22. insert into PPW_EMAIL.email_fund_nav(file_id, fund_id, fund_name,register_number,price_date,
  23. nav,cumulative_nav_withdrawal,is_stored,exception_status,
  24. isvalid, creatorid, createtime, updaterid, updatetime)
  25. values
  26. <foreach collection="itemDoList" item="itemDo" index="index" separator=",">
  27. (#{itemDo.fileId},#{itemDo.fundId},#{itemDo.fundName},#{itemDo.registerNumber},#{itemDo.priceDate},
  28. #{itemDo.nav},#{itemDo.cumulativeNavWithdrawal},#{itemDo.isStored},#{itemDo.exceptionStatus},
  29. #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
  30. </foreach>
  31. </insert>
  32. <select id="searchNavDetail" resultMap="BaseResultMap">
  33. SELECT distinct nav.id,
  34. nav.fund_id,
  35. nav.fund_name,
  36. nav.register_number,
  37. nav.price_date,
  38. nav.nav,
  39. nav.cumulative_nav_withdrawal,
  40. nav.exception_status,
  41. nav.is_stored,
  42. nav.updatetime
  43. FROM
  44. PPW_EMAIL.email_fund_nav nav
  45. WHERE nav.isvalid = 1
  46. <if test="fundName != null and fundName !=''">
  47. and nav.fund_name like concat('%',#{fundName},'%')
  48. </if>
  49. <if test="priceStartDate != null and priceStartDate !=''">
  50. and nav.price_date >= #{priceStartDate}
  51. </if>
  52. <if test="priceEndDate != null and priceEndDate !=''">
  53. and nav.price_date <![CDATA[ <= ]]> #{priceEndDate}
  54. </if>
  55. <if test="exceptionStatus != null">
  56. and nav.exception_status = #{exceptionStatus}
  57. </if>
  58. <if test="updateStartDate != null and updateStartDate !=''">
  59. and nav.updatetime <![CDATA[ >= ]]> #{updateStartDate}
  60. </if>
  61. <if test="updateEndDate != null and updateEndDate !=''">
  62. and nav.updatetime <![CDATA[ <= ]]> #{updateEndDate}
  63. </if>
  64. <if test="isStore != null">
  65. and nav.is_stored = #{isStore}
  66. </if>
  67. order by nav.fund_name desc,nav.price_date desc
  68. limit #{offset},#{pageSize}
  69. </select>
  70. <select id="countNavDetail" resultType="java.lang.Long"
  71. parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
  72. select count(1) from (
  73. SELECT distinct nav.id,
  74. nav.fund_id,
  75. nav.fund_name,
  76. nav.register_number,
  77. nav.price_date,
  78. nav.nav,
  79. nav.cumulative_nav_withdrawal,
  80. nav.exception_status,
  81. nav.is_stored,
  82. nav.updatetime
  83. FROM
  84. PPW_EMAIL.email_fund_nav nav
  85. WHERE nav.isvalid = 1
  86. <if test="fundName != null and fundName !=''">
  87. and nav.fund_name like concat('%',#{fundName},'%')
  88. </if>
  89. <if test="priceStartDate != null and priceStartDate !=''">
  90. and nav.price_date >= #{priceStartDate}
  91. </if>
  92. <if test="priceEndDate != null and priceEndDate !=''">
  93. and nav.price_date <![CDATA[ <= ]]> #{priceEndDate}
  94. </if>
  95. <if test="exceptionStatus != null">
  96. and nav.exception_status = #{exceptionStatus}
  97. </if>
  98. <if test="updateStartDate != null and updateStartDate !=''">
  99. and nav.updatetime <![CDATA[ >= ]]> #{updateStartDate}
  100. </if>
  101. <if test="updateEndDate != null and updateEndDate !=''">
  102. and nav.updatetime <![CDATA[ <= ]]> #{updateEndDate}
  103. </if>
  104. <if test="isStore != null">
  105. and nav.is_stored = #{isStore}
  106. </if>
  107. ) a
  108. </select>
  109. </mapper>