YPZ пре 3 недеља
родитељ
комит
1fe1510fd0

+ 4 - 0
java/storlead-sasa/storlead-trade/src/main/java/com/storlead/trade/service/impl/MarketingCampaignServiceImpl.java

@@ -135,6 +135,8 @@ public class MarketingCampaignServiceImpl
                     "count(distinct customer_id) as cnt", qw -> qw.eq("has_reply", 1));
             Map<Long, Long> protectMap = countEmailsByCampaign(marketingCampaignIdList,
                     "count(distinct customer_id) as cnt", qw -> qw.eq("has_protect", 1));
+            Map<Long, Long> suspendMap = countEmailsByCampaign(marketingCampaignIdList,
+                    "count(distinct customer_id) as cnt", qw -> qw.eq("has_suspended", 1));
             Map<Long, Long> pendingMap = countEmailsByCampaign(marketingCampaignIdList,
                     "count(*) as cnt", qw -> qw.eq("status", -1));
             Map<Long, Long> sentMap = countEmailsByCampaign(marketingCampaignIdList,
@@ -157,6 +159,8 @@ public class MarketingCampaignServiceImpl
                 vo.setOpenedCustomerCount(toInt(openedMap.get(id)));
                 vo.setRepliedCustomerCount(toInt(repliedMap.get(id)));
                 vo.setProtectWhitelistCount(toInt(protectMap.get(id)));
+                vo.setSuspendlistCount(toInt(suspendMap.get(id)));
+                vo.setManualInterventionCount(vo.getSuspendlistCount()+vo.getProtectWhitelistCount());
                 int pending = toInt(pendingMap.get(id));
                 int sent = toInt(sentMap.get(id));
                 int firstSent = toInt(firstSentMap.get(id));

+ 6 - 0
java/storlead-sasa/storlead-trade/src/main/java/com/storlead/trade/vo/MarketingCampaignVO.java

@@ -167,6 +167,12 @@ public class MarketingCampaignVO extends SysBaseField {
     @ApiModelProperty(value = "统计:客户保护白名单数(去重 customer_id, has_protect=1)")
     private Integer protectWhitelistCount;
 
+    @ApiModelProperty(value = "统计:客户营销暂停白名单数(去重 customer_id, has_suspend=1)")
+    private Integer suspendlistCount;
+
+    @ApiModelProperty(value = "统计:人工干预数(客户保护+客户营销暂停)")
+    private Integer manualInterventionCount;
+
     @ApiModelProperty(value = "统计:待发送邮件数(status=-1)")
     private Integer pendingEmailCount;