12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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.simuwang.base.mapper.NavMapper">
- <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.NavDO">
- <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="isvalid" property="isvalid"/>
- <result column="creatorid" property="creatorId"/>
- <result column="createtime" property="createTime"/>
- <result column="updaterid" property="updaterId"/>
- <result column="updatetime" property="updateTime"/>
- </resultMap>
- <insert id="batchInsert" parameterType="com.simuwang.base.pojo.dos.NavDO">
- insert into PPW_EMAIL.nav(fund_id,price_date,nav,cumulative_nav,cumulative_nav_withdrawal,
- isvalid, creatorid, createtime, updaterid, updatetime)
- values
- <foreach collection="itemDoList" item="itemDo" index="index" separator=",">
- (#{itemDo.fundId},#{itemDo.priceDate},#{itemDo.nav},#{itemDo.cumulativeNav},#{itemDo.cumulativeNavWithdrawal},
- #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
- </foreach>
- </insert>
- <insert id="batchUpdate">
- <foreach collection="itemDoList" item="itemDo" index="index" open="" close="" separator=";">
- update PPW_EMAIL.nav
- <set>
- nav = #{itemDo.nav},
- cumulative_nav_withdrawal = #{itemDo.cumulativeNavWithdrawal},
- updatetime=#{itemDo.updateTime}
- </set>
- where isvalid = 1
- and fund_id = #{itemDo.fundId}
- and price_date = #{itemDo.priceDate}
- </foreach>
- </insert>
- <select id="queryFundNavByDate" resultType="java.lang.String">
- select price_date
- from PPW_EMAIL.nav
- where isvalid = 1
- and fund_id = #{fundId}
- and price_date in
- <foreach collection="priceDateList" index="index" item="priceDate" separator="," open="(" close=")">
- #{priceDate}
- </foreach>
- </select>
- <select id="queryFundNav" resultMap="BaseResultMap"
- parameterType="com.simuwang.base.pojo.dos.NavDO">
- SELECT id, fund_id,price_date,nav,cumulative_nav,cumulative_nav_withdrawal,
- isvalid, creatorid, createtime, updaterid, updatetime
- from PPW_EMAIL.nav
- where isvalid = 1
- and fund_id = #{fundId}
- and price_date=#{priceDate}
- </select>
- </mapper>
|