|
@@ -18,16 +18,16 @@
|
|
|
<result column="is_send" property="isSend"/>
|
|
|
</resultMap>
|
|
|
<insert id="saveDeletionInfoDO" parameterType="com.simuwang.base.pojo.dos.DeletionInfoDO">
|
|
|
- insert into PPW_EMAIL.deletion_info(fund_id,deletion_type,deletion_date,isvalid,createtime,updatetime,is_send)
|
|
|
+ insert into deletion_info(fund_id,deletion_type,deletion_date,isvalid,createtime,updatetime,is_send)
|
|
|
values (#{fundId},#{deletionType},#{deletionDate},#{isvalid},#{createTime},#{updateTime},#{isSend})
|
|
|
</insert>
|
|
|
<update id="update" parameterType="com.simuwang.base.pojo.dos.FundDeletionInfoDO">
|
|
|
- update PPW_EMAIL.deletion_info set fund_id=#{fundId},deletion_type=#{deletionType},deletion_date=#{deletionDate},remark=#{remark},updatetime=#{updateTime}
|
|
|
+ update deletion_info set fund_id=#{fundId},deletion_type=#{deletionType},deletion_date=#{deletionDate},remark=#{remark},updatetime=#{updateTime}
|
|
|
where id=#{id} and isvalid=1
|
|
|
</update>
|
|
|
<update id="batchUpdate">
|
|
|
<foreach collection="itemDoList" item="itemDo" index="index" open="" close="" separator=";">
|
|
|
- update PPW_EMAIL.deletion_info
|
|
|
+ update deletion_info
|
|
|
<set>
|
|
|
fund_id=#{itemDo.fundId},
|
|
|
deletion_type = #{itemDo.deletionType},
|
|
@@ -40,7 +40,7 @@
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<update id="updateRemark">
|
|
|
- update PPW_EMAIL.deletion_info set remark=#{remark},updaterid=#{updaterId} where isvalid=1 and remark is null
|
|
|
+ update deletion_info set remark=#{remark},updaterid=#{updaterId} where isvalid=1 and remark is null
|
|
|
<if test="fundId != null and fundId !=''">
|
|
|
and fund_id=#{fundId}
|
|
|
</if>
|
|
@@ -52,13 +52,13 @@
|
|
|
</if>
|
|
|
</update>
|
|
|
<delete id="deleteDeletionRemark">
|
|
|
- update PPW_EMAIL.deletion_info set isvalid=0,updatetime=sysdate() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType}
|
|
|
+ update deletion_info set isvalid=0,updatetime=sysdate() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType}
|
|
|
<if test="tradeDate != null and tradeDate !=''">
|
|
|
and deletion_date=#{tradeDate}
|
|
|
</if>
|
|
|
</delete>
|
|
|
<delete id="deleteDeletion">
|
|
|
- update PPW_EMAIL.deletion_info set isvalid=0,updatetime=sysdate() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType} and remark is null
|
|
|
+ update deletion_info set isvalid=0,updatetime=sysdate() where isvalid=1 and fund_id=#{fundId} and deletion_type=#{deletionType} and remark is null
|
|
|
</delete>
|
|
|
<select id="searchDeletionList" resultMap="BaseResultMap"
|
|
|
parameterType="com.simuwang.base.pojo.dto.query.DeletionPageQuery">
|
|
@@ -70,10 +70,10 @@
|
|
|
ddn.deletion_num,
|
|
|
ddp.processed_num
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info d
|
|
|
- LEFT JOIN PPW_EMAIL.pvn_fund_info info
|
|
|
+ deletion_info d
|
|
|
+ LEFT JOIN pvn_fund_info info
|
|
|
ON d.fund_id = info.fund_id and info.isvalid=1
|
|
|
- LEFT JOIN PPW_EMAIL.pvn_company_info c
|
|
|
+ LEFT JOIN pvn_company_info c
|
|
|
ON info.trust_id = c.company_id and c.isvalid=1
|
|
|
LEFT JOIN
|
|
|
(SELECT
|
|
@@ -81,7 +81,7 @@
|
|
|
di.deletion_type,
|
|
|
COUNT(di.fund_id) AS deletion_num
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info di
|
|
|
+ deletion_info di
|
|
|
WHERE di.isvalid = 1
|
|
|
AND di.remark IS NULL
|
|
|
GROUP BY di.fund_id,
|
|
@@ -94,7 +94,7 @@
|
|
|
dip.deletion_type,
|
|
|
COUNT(dip.fund_id) AS processed_num
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info dip
|
|
|
+ deletion_info dip
|
|
|
WHERE dip.isvalid = 1
|
|
|
AND dip.remark IS NOT NULL
|
|
|
GROUP BY dip.fund_id,
|
|
@@ -130,10 +130,10 @@
|
|
|
ddn.deletion_num,
|
|
|
ddp.processed_num
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info d
|
|
|
- LEFT JOIN PPW_EMAIL.pvn_fund_info info
|
|
|
+ deletion_info d
|
|
|
+ LEFT JOIN pvn_fund_info info
|
|
|
ON d.fund_id = info.fund_id and info.isvalid=1
|
|
|
- LEFT JOIN PPW_EMAIL.pvn_company_info c
|
|
|
+ LEFT JOIN pvn_company_info c
|
|
|
ON info.trust_id = c.company_id and c.isvalid=1
|
|
|
LEFT JOIN
|
|
|
(SELECT
|
|
@@ -141,7 +141,7 @@
|
|
|
di.deletion_type,
|
|
|
COUNT(di.fund_id) AS deletion_num
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info di
|
|
|
+ deletion_info di
|
|
|
WHERE di.isvalid = 1
|
|
|
AND di.remark IS NULL
|
|
|
GROUP BY di.fund_id,
|
|
@@ -154,7 +154,7 @@
|
|
|
dip.deletion_type,
|
|
|
COUNT(dip.fund_id) AS processed_num
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info dip
|
|
|
+ deletion_info dip
|
|
|
WHERE dip.isvalid = 1
|
|
|
AND dip.remark IS NOT NULL
|
|
|
GROUP BY dip.fund_id,
|
|
@@ -180,7 +180,7 @@
|
|
|
group by d.fund_id,d.deletion_type) a
|
|
|
</select>
|
|
|
<select id="getLastDeletionDateByFundId" resultType="java.lang.String">
|
|
|
- select max(deletion_date) from PPW_EMAIL.deletion_info where fund_id=#{fundId} and deletion_type=#{deletionType}
|
|
|
+ select max(deletion_date) from deletion_info where fund_id=#{fundId} and deletion_type=#{deletionType}
|
|
|
</select>
|
|
|
|
|
|
<resultMap id="BaseMap" type="com.simuwang.base.pojo.dos.FundDeletionInfoDO">
|
|
@@ -211,8 +211,8 @@
|
|
|
d.createtime,
|
|
|
d.updatetime
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info d
|
|
|
- left join PPW_EMAIL.pvn_fund_info info
|
|
|
+ deletion_info d
|
|
|
+ left join pvn_fund_info info
|
|
|
on d.fund_id =info.fund_id and info.isvalid=1
|
|
|
WHERE d.isvalid = 1
|
|
|
AND d.fund_id = #{fundId}
|
|
@@ -224,8 +224,8 @@
|
|
|
parameterType="com.simuwang.base.pojo.dto.query.FundDeletionPageQuery">
|
|
|
select count(d.id)
|
|
|
FROM
|
|
|
- PPW_EMAIL.deletion_info d
|
|
|
- left join PPW_EMAIL.pvn_fund_info info
|
|
|
+ deletion_info d
|
|
|
+ left join pvn_fund_info info
|
|
|
on d.fund_id =info.fund_id and info.isvalid=1
|
|
|
WHERE d.isvalid = 1
|
|
|
AND d.fund_id = #{fundId}
|
|
@@ -235,7 +235,7 @@
|
|
|
<select id="selectFundDeletionInfoVOList" resultType="com.simuwang.base.pojo.dos.FundDeletionInfoDO"
|
|
|
parameterType="java.util.List">
|
|
|
select id,fund_id,deletion_type,deletion_date,remark,isvalid,creatorid,updaterid,createtime,updatetime
|
|
|
- from PPW_EMAIL.deletion_info where isvalid=1 and remark is null
|
|
|
+ from deletion_info where isvalid=1 and remark is null
|
|
|
<if test="fundId != null and fundId !=''">
|
|
|
and fund_id = #{fundId}
|
|
|
</if>
|
|
@@ -247,7 +247,7 @@
|
|
|
<select id="getDeletionInfoDO" resultType="com.simuwang.base.pojo.dos.DeletionInfoDO"
|
|
|
parameterType="com.simuwang.base.pojo.dos.DeletionInfoDO">
|
|
|
select id,fund_id,deletion_type,deletion_date,remark,isvalid,creatorid,updaterid,createtime,updatetime
|
|
|
- from PPW_EMAIL.deletion_info where fund_id=#{fundId} and deletion_date=#{deletionDate} and deletion_type=#{deletionType} limit 1
|
|
|
+ from deletion_info where fund_id=#{fundId} and deletion_date=#{deletionDate} and deletion_type=#{deletionType} limit 1
|
|
|
</select>
|
|
|
|
|
|
<resultMap id="BaseEmailMap" type="com.simuwang.base.pojo.dos.EmailDeletionInfoDO">
|
|
@@ -258,9 +258,9 @@
|
|
|
</resultMap>
|
|
|
<select id="getDeletionInfoByFundId" resultType="com.simuwang.base.pojo.dos.EmailDeletionInfoDO">
|
|
|
select info.fund_name,c.company_name,d.deletion_type,d.deletion_date
|
|
|
- from PPW_EMAIL.deletion_info d
|
|
|
- join PPW_EMAIL.pvn_fund_info info on d.fund_id=info.fund_id
|
|
|
- join PPW_EMAIL.pvn_company_info c on c.company_id=info.trust_id
|
|
|
+ from deletion_info d
|
|
|
+ join pvn_fund_info info on d.fund_id=info.fund_id
|
|
|
+ join pvn_company_info c on c.company_id=info.trust_id
|
|
|
where d.isvalid=1 and info.isvalid=1 and c.isvalid=1 and d.remark is null and d.is_send=0
|
|
|
and d.fund_id in
|
|
|
<foreach collection="fundIdList" index="index" item="fundId" separator="," open="(" close=")">
|
|
@@ -269,17 +269,17 @@
|
|
|
order by info.fund_id desc,d.deletion_type desc,d.deletion_date desc
|
|
|
</select>
|
|
|
<update id="removeDistributeDeletion" parameterType="java.lang.String">
|
|
|
- update PPW_EMAIL.deletion_info set isvalid=0,updatetime=sysdate() where fund_id=#{fundId} and remark is null
|
|
|
+ update deletion_info set isvalid=0,updatetime=sysdate() where fund_id=#{fundId} and remark is null
|
|
|
</update>
|
|
|
<update id="updateSendStatusByFundId">
|
|
|
- update PPW_EMAIL.deletion_info d set is_send=1,updatetime=sysdate() where isvalid=1
|
|
|
+ update deletion_info d set is_send=1,updatetime=sysdate() where isvalid=1
|
|
|
and d.fund_id in
|
|
|
<foreach collection="fundIdList" index="index" item="fundId" separator="," open="(" close=")">
|
|
|
#{fundId}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<update id="updateDeletionInfoDO">
|
|
|
- update PPW_EMAIL.deletion_info d set isvalid=1,updatetime=sysdate() where id=#{id}
|
|
|
+ update deletion_info d set isvalid=1,updatetime=sysdate() where id=#{id}
|
|
|
</update>
|
|
|
|
|
|
</mapper>
|