Jelajahi Sumber

邮件修正

YPZ 4 minggu lalu
induk
melakukan
3667171b22

+ 0 - 3
java/storlead-mail/storlead-mail-api/src/main/java/com/storlead/mail/webclient/dto/MktSendMailRemoteDTO.java

@@ -60,7 +60,4 @@ public class MktSendMailRemoteDTO {
 
     @ApiModelProperty("回复原信 id")
     private Long replyMsgId;
-
-    @ApiModelProperty("是否已打开(像素)")
-    private Integer opened;
 }

+ 1 - 1
java/storlead-sasa/storlead-trade/src/main/java/com/storlead/trade/service/impl/MarketEmailsServiceImpl.java

@@ -987,7 +987,7 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
             dto.setRecipientls(recipientls);
             dto.setSubject(marketEmail.getSubject());
             dto.setContent(marketEmail.getContent());
-            dto.setOpened(1);
+            dto.setIsTrack(1);
 //            dto.setDelaySendTime(marketEmail.getExpectSendTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
             Result result = mktMailRemoteClient.send(dto);
             if (result.isSuccess()) {

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

@@ -401,11 +401,11 @@ public class MarketingCampaignServiceImpl
     public void syncStartEndStatus() {
         LocalDate today = LocalDate.now(ZoneId.of("Asia/Shanghai"));
         // 查询所有未开始的活动
-        List<MarketingCampaignEntity> all = this.lambdaQuery()
+        List<MarketingCampaignEntity> nonAll = this.lambdaQuery()
                 .eq(MarketingCampaignEntity::getIsDelete, CommonConstant.DEL_FLAG_0)
                 .eq(MarketingCampaignEntity::getStatus, 0)
                 .list();
-        if (CollectionUtils.isEmpty(all)) {
+        if (CollectionUtils.isEmpty(nonAll)) {
             log.info("营销活动开始/结束状态同步:无未删除活动,跳过");
             return;
         }
@@ -414,7 +414,7 @@ public class MarketingCampaignServiceImpl
         Map<Integer, List<Long>> idsByStatus = new HashMap<>(4);
         // 变更的实体列表(status 已回填为目标状态,用于区分改为开始/结束)
         List<MarketingCampaignEntity> changed = new ArrayList<>();
-        for (MarketingCampaignEntity c : all) {
+        for (MarketingCampaignEntity c : nonAll) {
             Integer expected = computeStartEndStatus(c, today);
             if (expected == null) {
                 continue;

+ 3 - 2
java/storlead-sasa/storlead-trade/src/main/java/com/storlead/trade/service/impl/MarketingCampaignSopDetailServiceImpl.java

@@ -89,6 +89,7 @@ public class MarketingCampaignSopDetailServiceImpl
 
         Map<Long,CustomerVO> customerEntityMap = customerVOList.stream().collect(Collectors.toMap(CustomerVO::getId, customerVO -> customerVO));
         for (MarketEmailsEntity marketEmailsEntity : marketEmailsEntityList) {
+            String emailContentNew = emailContent;
             //查询客户信息
 //            客户名称:${customerName}$
 //            区域名称:${areaName}$
@@ -131,13 +132,13 @@ public class MarketingCampaignSopDetailServiceImpl
                 if (!ObjectUtils.isEmpty(customerEntity.getLiaison().getEmail())){
                     email = customerEntity.getLiaison().getEmail();
                 }
-                emailContent = emailContent.replace("${customerName}$", companyName)
+                emailContentNew = emailContentNew.replace("${customerName}$", customerName)
                         .replace("${areaName}$", areaName)
                         .replace("${companyName}$", companyName)
                         .replace("${companyUrl}$", companyUrl)
                         .replace("${liaisonName}$", liaisonName)
                         .replace("${email}$", email);
-                marketEmailsEntity.setContent(emailContent);
+                marketEmailsEntity.setContent(emailContentNew);
             }
             if (!ObjectUtils.isEmpty(marketEmailsEntity.getCustomerId()) && !ObjectUtils.isEmpty(customerEntityMap.get(marketEmailsEntity.getCustomerId()).getCustomerCompany()) && !ObjectUtils.isEmpty(customerEntityMap.get(marketEmailsEntity.getCustomerId()).getCustomerCompany().getEmail())){
                 marketEmailsEntity.setRecipient(customerEntityMap.get(marketEmailsEntity.getCustomerId()).getCustomerCompany().getEmail());