瀏覽代碼

feat:手动发送缺失邮件优化

chenjianhua 1 月之前
父節點
當前提交
147060a454

+ 2 - 0
service-base/src/main/java/com/simuwang/base/mapper/daq/DeletionInfoMapper.java

@@ -80,4 +80,6 @@ public interface DeletionInfoMapper {
     List<EmailDeletionInfoDO> selectNavNotRemarkDeletionInfoByFundId(@Param("fundId")String fundId);
 
     List<EmailDeletionInfoDO> selectAssetNotRemarkDeletionInfoByFundId(@Param("fundId")String fundId);
+
+    List<EmailDeletionInfoDO> selectDistributeNotRemarkDeletionInfoByFundId(@Param("fundId")String fundId);
 }

+ 14 - 2
service-base/src/main/resources/mapper/daq/DeletionInfoMapper.xml

@@ -337,7 +337,7 @@
         order by d.deletion_type,d.deletion_date desc
     </select>
     <select id="selectNavNotRemarkDeletionInfoByFundId"
-            resultType="com.simuwang.base.pojo.dos.EmailDeletionInfoDO">
+            resultMap="BaseEmailMap">
         select info.fund_id,info.fund_name,c.company_name,d.deletion_type,d.deletion_date,ci.id as channel_id,ci.channel_name
         from deletion_info d
                  join pvn_fund_info info on d.fund_id=info.fund_id
@@ -349,7 +349,7 @@
         order by d.deletion_type,d.deletion_date desc
     </select>
     <select id="selectAssetNotRemarkDeletionInfoByFundId"
-            resultType="com.simuwang.base.pojo.dos.EmailDeletionInfoDO">
+            resultMap="BaseEmailMap">
         select info.fund_id,info.fund_name,c.company_name,d.deletion_type,d.deletion_date,ci.id as channel_id,ci.channel_name
         from deletion_info d
                  join pvn_fund_info info on d.fund_id=info.fund_id
@@ -360,6 +360,18 @@
           and d.fund_id = #{fundId}
         order by d.deletion_type,d.deletion_date desc
     </select>
+    <select id="selectDistributeNotRemarkDeletionInfoByFundId"
+            resultMap="BaseEmailMap">
+        select info.fund_id,info.fund_name,c.company_name,d.deletion_type,d.deletion_date,ci.id as channel_id,ci.channel_name
+        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
+                 left join channel_info ci on ci.id=d.channel_id and ci.isvalid=1
+        where d.isvalid=1 and info.isvalid=1 and c.isvalid=1 and d.remark is null
+          and d.deletion_type = 3
+          and d.fund_id =#{fundId}
+        order by d.deletion_date
+    </select>
     <update id="updateSendStatusByFundId">
         update deletion_info d set d.is_send=1,d.updatetime=now() where d.isvalid=1
         and d.fund_id in

+ 1 - 1
service-manage/src/main/java/com/simuwang/manage/service/impl/CompanyEmailConfigServiceImpl.java

@@ -696,7 +696,7 @@ public class CompanyEmailConfigServiceImpl implements CompanyEmailConfigService
         List<String> fundIdList = fundInfoMapper.getFundIdByCompanyId(companyId);
         List<EmailDeletionInfoDO> emailDeletionInfoDOS = new ArrayList<>();
         for (String fundId : fundIdList) {
-            List<EmailDeletionInfoDO> distributeDeletionList = deletionInfoMapper.selectDistributeDeletionInfoByFundId(fundId);
+            List<EmailDeletionInfoDO> distributeDeletionList = deletionInfoMapper.selectDistributeNotRemarkDeletionInfoByFundId(fundId);
             if(distributeDeletionList.isEmpty()){
                 continue;
             }