12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?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.daq.EmailFundNavCollectionMapper">
- <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.EmailFundNavCollectionDO">
- <id column="id" property="id"/>
- <result column="email_id" property="emailId"/>
- <result column="file_id" property="fileId"/>
- <result column="fund_name" property="fundName"/>
- <result column="register_number" property="registerNumber"/>
- <result column="price_date" property="priceDate"/>
- <result column="parse_date" property="parseDate"/>
- <result column="nav" property="nav"/>
- <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal"/>
- <result column="asset_net" property="assetNet"/>
- <result column="asset_share" property="assetShare"/>
- <result column="exception_status" property="exceptionStatus"/>
- <result column="template_id" property="templateId"/>
- <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.EmailFundNavDO">
- insert into email_fund_nav_collection(email_id,file_id, fund_name,register_number,price_date,
- nav,cumulative_nav_withdrawal,exception_status,template_id,
- isvalid, creatorid, createtime, updaterid, updatetime,asset_net,asset_share,parse_date,email,sender_email,email_date)
- values
- <foreach collection="itemDoList" item="itemDo" index="index" separator=",">
- (#{itemDo.emailId},#{itemDo.fileId},#{itemDo.fundName},#{itemDo.registerNumber},#{itemDo.priceDate},
- #{itemDo.nav},#{itemDo.cumulativeNavWithdrawal},#{itemDo.exceptionStatus},#{itemDo.templateId},
- #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime},
- #{itemDo.assetNet}, #{itemDo.assetShare}, #{itemDo.parseDate}, #{itemDo.email}, #{itemDo.senderEmail}, #{itemDo.emailDate})
- </foreach>
- </insert>
- <delete id="delete">
- update email_fund_nav_collection set isvalid=0,updatetime=now() where file_id=#{fileId} and isvalid=1 and email_id=#{emailId}
- </delete>
- <select id="countByFileId" resultType="java.lang.Long">
- select count(*) from email_fund_nav_collection where file_id=#{fileId} and isvalid=1 and email_id=#{emailId}
- </select>
- <select id="selectEmailFundNavCollectionDOByEmailFileId" resultMap="BaseResultMap">
- select id,email_id,file_id, fund_name,register_number,price_date,
- nav,cumulative_nav_withdrawal,exception_status,template_id,
- isvalid, creatorid, createtime, updaterid, updatetime,asset_net,
- asset_share,parse_date,email,sender_email,email_date
- from email_fund_nav_collection where file_id=#{fileId} and isvalid=1 and email_id=#{emailId}
- order by price_date desc
- limit #{offset},#{pageSize}
- </select>
- <select id="countDataByExceptionStatus" resultType="java.lang.Long">
- select count(1) as total from email_fund_nav_collection where isvalid=1
- <if test="item.startDate != null and item.startDate != ''">
- and email_date >= #{item.startDate}
- </if>
- <if test="item.endDate != null and item.endDate != ''">
- and email_date <![CDATA[ <= ]]> #{item.endDate}
- </if>
- <if test="item.email !=null and item.email !=''">
- and email like concat('%',#{item.email},'%')
- </if>
- <if test="item.senderEmail !=null and item.senderEmail !=''">
- and sender_email like concat('%',#{item.senderEmail},'%')
- </if>
- <if test="exceptionStatus !=null and exceptionStatus !=''">
- and exception_status = #{exceptionStatus}
- </if>
- </select>
- </mapper>
|