|
|
@@ -11,10 +11,7 @@ import com.storlead.mail.service.MktMailMessageService;
|
|
|
import com.storlead.trade.dto.CustomerDTO;
|
|
|
import com.storlead.trade.dto.MarketingCampaignSopDetailDTO;
|
|
|
import com.storlead.trade.dto.SysDictDetailResponseDTO;
|
|
|
-import com.storlead.trade.entity.CustomerEntity;
|
|
|
-import com.storlead.trade.entity.MarketEmailsEntity;
|
|
|
-import com.storlead.trade.entity.MarketingCampaignSopDetailEntity;
|
|
|
-import com.storlead.trade.entity.SysDictDetailEntity;
|
|
|
+import com.storlead.trade.entity.*;
|
|
|
import com.storlead.trade.mapper.MarketingCampaignSopDetailMapper;
|
|
|
import com.storlead.trade.service.*;
|
|
|
import com.storlead.trade.service.impl.support.TradeDataSourceServiceImpl;
|
|
|
@@ -127,12 +124,19 @@ public class MarketingCampaignSopDetailServiceImpl
|
|
|
marketEmailsEntity.setStatus(-1);
|
|
|
CustomerVO customerEntity = customerEntityMap.get(marketEmailsEntity.getCustomerId());
|
|
|
if (customerEntity != null) {
|
|
|
+ if (ObjectUtils.isEmpty(customerEntity.getCustomerCompany())) {
|
|
|
+ customerEntity.setCustomerCompany(new CustomerCompanyEntity());
|
|
|
+ }
|
|
|
|
|
|
// ${areaName}$、${customerIndustry}$
|
|
|
//修改emailContent中全部的${customerName}$为customerEntity.getCustomerName()
|
|
|
+ String industry = "";
|
|
|
+ if (!ObjectUtils.isEmpty(customerEntity.getCustomerCompany().getIndustry())){
|
|
|
+ industry = customerEntity.getCustomerCompany().getIndustry();
|
|
|
+ }
|
|
|
emailContent = emailContent.replace("${customerName}$", customerEntity.getCustomerName())
|
|
|
.replace("${areaName}$", customerEntity.getCountry())
|
|
|
- .replace("${customerIndustry}$", customerEntity.getCustomerCompany().getIndustry())
|
|
|
+ .replace("${customerIndustry}$", industry)
|
|
|
.replace("${yourName}$", yourName)
|
|
|
.replace("${yourTitle}$", yourTitle)
|
|
|
.replace("${yourCompany}$", yourCompany)
|