1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?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.EmailFundAssetMapper">
- <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.EmailFundAssetDO">
- <id column="id" property="id"/>
- <result column="file_id" property="fileId"/>
- <result column="fund_id" property="fundId"/>
- <result column="fund_name" property="fundName"/>
- <result column="register_number" property="registerNumber"/>
- <result column="price_date" property="priceDate"/>
- <result column="asset_net" property="assetNet"/>
- <result column="asset_share" property="assetShare"/>
- <result column="is_stored" property="isStored"/>
- <result column="exception_status" property="exceptionStatus"/>
- <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.EmailFundAssetDO">
- insert into PPW_EMAIL.email_fund_asset(file_id, fund_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,
- isvalid, creatorid, createtime, updaterid, updatetime)
- values
- <foreach collection="itemDoList" item="itemDo" index="index" separator=",">
- (#{itemDo.fileId},#{itemDo.fundId},#{itemDo.fundName},#{itemDo.registerNumber},#{itemDo.priceDate},#{itemDo.assetNet},#{itemDo.assetShare},#{itemDo.isStored},#{itemDo.exceptionStatus},
- #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
- </foreach>
- </insert>
- <select id="searchAssetDetail" resultMap="BaseResultMap"
- parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
- select distinct fund_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,updatetime
- from PPW_EMAIL.email_fund_asset asset where isvalid=1
- <if test="fundName != null and fundName !=''">
- and asset.fund_name like concat('%',#{fundName},'%')
- </if>
- <if test="priceStartDate != null and priceStartDate !=''">
- and asset.price_date >= #{priceStartDate}
- </if>
- <if test="priceEndDate != null and priceEndDate !=''">
- and asset.price_date <![CDATA[ <= ]]> #{priceEndDate}
- </if>
- <if test="exceptionStatus != null">
- and asset.exception_status = #{exceptionStatus}
- </if>
- <if test="updateStartDate != null and updateStartDate !=''">
- and asset.updatetime <![CDATA[ >= ]]> #{updateStartDate}
- </if>
- <if test="updateEndDate != null and updateEndDate !=''">
- and asset.updatetime <![CDATA[ <= ]]> #{updateEndDate}
- </if>
- <if test="isStore != null">
- and asset.is_stored = #{isStore}
- </if>
- order by asset.fund_name desc,asset.price_date desc
- limit #{offset},#{pageSize}
- </select>
- <select id="countAssetDetail" resultType="java.lang.Long"
- parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
- select count(1) from (
- select distinct fund_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,
- updatetime
- from PPW_EMAIL.email_fund_asset asset where isvalid=1
- <if test="fundName != null and fundName !=''">
- and asset.fund_name like concat('%',#{fundName},'%')
- </if>
- <if test="priceStartDate != null and priceStartDate !=''">
- and asset.price_date >= #{priceStartDate}
- </if>
- <if test="priceEndDate != null and priceEndDate !=''">
- and asset.price_date <![CDATA[ <= ]]> #{priceEndDate}
- </if>
- <if test="exceptionStatus != null">
- and asset.exception_status = #{exceptionStatus}
- </if>
- <if test="updateStartDate != null and updateStartDate !=''">
- and asset.updatetime <![CDATA[ >= ]]> #{updateStartDate}
- </if>
- <if test="updateEndDate != null and updateEndDate !=''">
- and asset.updatetime <![CDATA[ <= ]]> #{updateEndDate}
- </if>
- <if test="isStore != null">
- and asset.is_stored = #{isStore}
- </if>
- )a
- </select>
- <delete id="deleteByFileId">
- update PPW_EMAIL.email_fund_asset
- set isvalid = 0,
- updatetime= now()
- where isvalid = 1
- and file_id = #{fileId}
- </delete>
- </mapper>
|