|
|
@@ -302,7 +302,7 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 取消发送邮件:status 置 -2(软取消,不删数据,isDelete 保持 0)
|
|
|
+ * 取消发送邮件:status 置 -3(软取消,不删数据,isDelete 保持 0)
|
|
|
* 支持单条(dto.id)或批量(dto.idList)
|
|
|
*/
|
|
|
@Override
|
|
|
@@ -325,6 +325,9 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
LambdaUpdateWrapper<MarketEmailsEntity> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.in(MarketEmailsEntity::getId, ids);
|
|
|
wrapper.eq(MarketEmailsEntity::getIsDelete, CommonConstant.DEL_FLAG_0);
|
|
|
+ if (dto.getStatus() == -3){
|
|
|
+ wrapper.ne(MarketEmailsEntity::getStatus, 1);
|
|
|
+ }
|
|
|
// status = -3 表示取消发送
|
|
|
// wrapper.set(MarketEmailsEntity::getStatus, -3);
|
|
|
wrapper.set(MarketEmailsEntity::getStatus, dto.getStatus());
|
|
|
@@ -775,6 +778,7 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 2. 提取分析结果id列表
|
|
|
// List<Long> customerAnalysisIdList = customerBaseList.stream()
|
|
|
// .map(CustomerBaseEntity::getCustomerAnalysisId)
|
|
|
@@ -798,7 +802,13 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
Map<Long, CustomerEntity> customerMap = Collections.emptyMap();
|
|
|
if (!CollectionUtils.isEmpty(customerIdList)) {
|
|
|
List<CustomerEntity> customerEntityList = customerTradeService.listByIds(customerIdList);
|
|
|
+ //去掉customerEntityList中getCountry为空的客户
|
|
|
+// customerEntityList = customerEntityList.stream().filter(c -> c.getCountry() != null).collect(Collectors.toList());
|
|
|
+// if (!CollectionUtils.isEmpty(customerEntityList)) {
|
|
|
+// customerMap = customerEntityList.stream().collect(Collectors.toMap(CustomerEntity::getId, c -> c));
|
|
|
+// }
|
|
|
customerMap = customerEntityList.stream().collect(Collectors.toMap(CustomerEntity::getId, c -> c));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 5. 构造返回结果
|
|
|
@@ -813,8 +823,11 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
vo.setCustomerName(customer.getCustomerName());
|
|
|
vo.setCountry(customer.getCountry());
|
|
|
vo.setContinent(customer.getContinent());
|
|
|
+ if (!ObjectUtils.isEmpty(customer.getCountry())) {
|
|
|
+ voList.add(vo);
|
|
|
+ }
|
|
|
}
|
|
|
- voList.add(vo);
|
|
|
+
|
|
|
}
|
|
|
//按照国家对voList进行分组
|
|
|
List<MarketEmailsEntity> marketEmailList = new ArrayList<>();
|