|
@@ -4,6 +4,7 @@
|
|
<resultMap id="BaseMap" type="com.simuwang.base.pojo.dos.DistributionDO">
|
|
<resultMap id="BaseMap" type="com.simuwang.base.pojo.dos.DistributionDO">
|
|
<id column="id" property="id"/>
|
|
<id column="id" property="id"/>
|
|
<result column="fund_id" property="fundId"/>
|
|
<result column="fund_id" property="fundId"/>
|
|
|
|
+ <result column="channel_id" property="channelId"/>
|
|
<result column="distribute_date" property="distributeDate"/>
|
|
<result column="distribute_date" property="distributeDate"/>
|
|
<result column="distribute_type" property="distributeType"/>
|
|
<result column="distribute_type" property="distributeType"/>
|
|
<result column="distribution" property="distribution"/>
|
|
<result column="distribution" property="distribution"/>
|
|
@@ -31,10 +32,10 @@
|
|
<result column="updaterid" property="updaterId"/>
|
|
<result column="updaterid" property="updaterId"/>
|
|
<result column="updatetime" property="updateTime"/>
|
|
<result column="updatetime" property="updateTime"/>
|
|
<result column="channel_id" property="channelId"/>
|
|
<result column="channel_id" property="channelId"/>
|
|
- <result column="channelName" property="channelName"/>
|
|
|
|
|
|
+ <result column="channel_name" property="channelName"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
<insert id="saveDistribution" parameterType="com.simuwang.base.pojo.dos.DistributionDO">
|
|
<insert id="saveDistribution" parameterType="com.simuwang.base.pojo.dos.DistributionDO">
|
|
- insert into distribution(fund_id,distribute_date,distribute_type,distribution,isvalid,creatorid,createtime,updatetime,updaterid,channle_id)
|
|
|
|
|
|
+ insert into distribution(fund_id,distribute_date,distribute_type,distribution,isvalid,creatorid,createtime,updatetime,updaterid,channel_id)
|
|
values (#{fundId},#{distributeDate},#{distributeType},#{distribution},#{isvalid},#{creatorId},#{createTime},#{updateTime},#{updaterId},#{channelId})
|
|
values (#{fundId},#{distributeDate},#{distributeType},#{distribution},#{isvalid},#{creatorId},#{createTime},#{updateTime},#{updaterId},#{channelId})
|
|
</insert>
|
|
</insert>
|
|
<update id="updateDistributionById" parameterType="com.simuwang.base.pojo.dos.DistributionDO">
|
|
<update id="updateDistributionById" parameterType="com.simuwang.base.pojo.dos.DistributionDO">
|
|
@@ -49,7 +50,7 @@
|
|
</delete>
|
|
</delete>
|
|
<select id="searchDistributionList" resultMap="BasePageMap"
|
|
<select id="searchDistributionList" resultMap="BasePageMap"
|
|
parameterType="com.simuwang.base.pojo.dto.query.DistributionPageQuery">
|
|
parameterType="com.simuwang.base.pojo.dto.query.DistributionPageQuery">
|
|
- SELECT DISTINCT
|
|
|
|
|
|
+ SELECT
|
|
d.id,
|
|
d.id,
|
|
d.fund_id,
|
|
d.fund_id,
|
|
info.fund_name,
|
|
info.fund_name,
|
|
@@ -93,7 +94,7 @@
|
|
and d.distribute_date >= #{startDate}
|
|
and d.distribute_date >= #{startDate}
|
|
</if>
|
|
</if>
|
|
<if test="channelName != null and channelName !=''">
|
|
<if test="channelName != null and channelName !=''">
|
|
- and ci.channelName = #{channelName}
|
|
|
|
|
|
+ and ci.channel_name = #{channelName}
|
|
</if>
|
|
</if>
|
|
<if test="endDate != null and endDate !=''">
|
|
<if test="endDate != null and endDate !=''">
|
|
and d.distribute_date <![CDATA[ <= ]]> #{endDate}
|
|
and d.distribute_date <![CDATA[ <= ]]> #{endDate}
|
|
@@ -133,7 +134,7 @@
|
|
and d.distribute_type = #{distributeType}
|
|
and d.distribute_type = #{distributeType}
|
|
</if>
|
|
</if>
|
|
<if test="channelName != null and channelName !=''">
|
|
<if test="channelName != null and channelName !=''">
|
|
- and ci.channelName = #{channelName}
|
|
|
|
|
|
+ and ci.channel_name = #{channelName}
|
|
</if>
|
|
</if>
|
|
<if test="startDate != null and startDate !=''">
|
|
<if test="startDate != null and startDate !=''">
|
|
and d.distribute_date >= #{startDate}
|
|
and d.distribute_date >= #{startDate}
|
|
@@ -156,17 +157,9 @@
|
|
from distribution where isvalid =1 and fund_id=#{fundId} and distribute_type=#{distributeType} and channel_id=#{channelId}
|
|
from distribution where isvalid =1 and fund_id=#{fundId} and distribute_type=#{distributeType} and channel_id=#{channelId}
|
|
</select>
|
|
</select>
|
|
<select id="getSumDistributeByFundId" resultType="java.math.BigDecimal" parameterType="java.lang.String">
|
|
<select id="getSumDistributeByFundId" resultType="java.math.BigDecimal" parameterType="java.lang.String">
|
|
- select sum(distribution) from distribution where isvalid =1 and fund_id=#{fundId} and distribute_date <![CDATA[ <= ]]> #{distributeDate}
|
|
|
|
|
|
+ select sum(distribution) from distribution where isvalid =1 and fund_id=#{fundId} and distribute_date <![CDATA[ <= ]]> #{distributeDate} and channel_id=#{channelId}
|
|
</select>
|
|
</select>
|
|
<select id="countDistributionTotal" resultType="java.lang.Long">
|
|
<select id="countDistributionTotal" resultType="java.lang.Long">
|
|
select count(1) from distribution where isvalid =1
|
|
select count(1) from distribution where isvalid =1
|
|
</select>
|
|
</select>
|
|
- <select id="selectDistributeListByTime" resultMap="BaseMap">
|
|
|
|
- select id,fund_id,distribute_date,distribute_type,distribution,isvalid,creatorid,createtime,updatetime,updaterid
|
|
|
|
- from distribution where updatetime <![CDATA[ <= ]]> #{endDate}
|
|
|
|
- <if test="startDate != null and startDate !=''">
|
|
|
|
- and updatetime >= #{startDate}
|
|
|
|
- </if>
|
|
|
|
- order by updatetime desc
|
|
|
|
- </select>
|
|
|
|
</mapper>
|
|
</mapper>
|