|
@@ -62,6 +62,9 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
private CustomerTradeService customerTradeService;
|
|
private CustomerTradeService customerTradeService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private CustomerCompanyTradeService customerCompanyTradeService;
|
|
|
|
|
+
|
|
|
@Resource
|
|
@Resource
|
|
|
@Lazy
|
|
@Lazy
|
|
|
private MarketingCampaignSopDetailService marketingCampaignSopDetailEntityService;
|
|
private MarketingCampaignSopDetailService marketingCampaignSopDetailEntityService;
|
|
@@ -79,6 +82,8 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
private MktMailRemoteClient mktMailRemoteClient;
|
|
private MktMailRemoteClient mktMailRemoteClient;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private LiaisonTradeService liaisonTradeService;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -1009,6 +1014,24 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
marketEmail.setProtectReason(marketOtherEmail.getProtectReason());
|
|
marketEmail.setProtectReason(marketOtherEmail.getProtectReason());
|
|
|
marketEmail.setProtectTime(marketOtherEmail.getProtectTime());
|
|
marketEmail.setProtectTime(marketOtherEmail.getProtectTime());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //通过客户id写入企业关联邮箱
|
|
|
|
|
+ String email = "";
|
|
|
|
|
+ CustomerCompanyEntity customerCompany = customerCompanyTradeService.getOne(new LambdaQueryWrapper<CustomerCompanyEntity>()
|
|
|
|
|
+ .eq(CustomerCompanyEntity::getCustomerId, marketEmail.getCustomerId())
|
|
|
|
|
+ .eq(CustomerCompanyEntity::getIsDelete, CommonConstant.DEL_FLAG_0)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if (!ObjectUtils.isEmpty(customerCompany)){
|
|
|
|
|
+ email = customerCompany.getEmail();
|
|
|
|
|
+ if (ObjectUtils.isEmpty(email)){
|
|
|
|
|
+ LiaisonEntity liaison = liaisonTradeService.getOne(new LambdaQueryWrapper<LiaisonEntity>()
|
|
|
|
|
+ .eq(LiaisonEntity::getCustomerId, marketEmail.getCustomerId())
|
|
|
|
|
+ .eq(LiaisonEntity::getIsDelete, CommonConstant.DEL_FLAG_0)
|
|
|
|
|
+ .eq(LiaisonEntity::getHasPrimaryLialison,1)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ email = liaison.getEmail();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
this.saveBatch(marketEmailList);
|
|
this.saveBatch(marketEmailList);
|
|
|
|
|
|