|
@@ -87,9 +87,19 @@ public class MarketingCampaignEntityServiceImpl
|
|
|
|
|
|
|
|
for (int i = 0; i < marketingCampaignVOList.size(); i++) {
|
|
for (int i = 0; i < marketingCampaignVOList.size(); i++) {
|
|
|
int finalI = i;
|
|
int finalI = i;
|
|
|
- List<CustomerBaseEntity> customerBaseList = customerBaseEntityList.stream().filter(customerBaseEntity -> customerBaseEntity.getCustomerAnalysisId().equals(customerAnalysisResultEntityList.get(finalI).getId())).collect(Collectors.toList());
|
|
|
|
|
- List<Long> customerAnalysisResultIdList = customerBaseList.stream().filter(e -> e.getMarketingCampaignId().equals(marketingCampaignVOList.get(finalI).getId())).map(CustomerBaseEntity::getCustomerAnalysisId).collect(Collectors.toList());
|
|
|
|
|
- List<CustomerAnalysisResultEntity> customerAnalysisResultEntityListI = customerAnalysisResultEntityList.stream().filter(customerAnalysisResultEntity -> customerAnalysisResultIdList.contains(customerAnalysisResultEntity.getId())).collect(Collectors.toList());
|
|
|
|
|
|
|
+ List<CustomerBaseEntity> customerBaseList = customerBaseEntityList.stream()
|
|
|
|
|
+ .filter(customerBaseEntity -> customerBaseEntity.getMarketingCampaignId().equals(marketingCampaignVOList.get(finalI).getId()))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ List<Long> customerAnalysisResultIdList = customerBaseList.stream()
|
|
|
|
|
+ .map(CustomerBaseEntity::getCustomerAnalysisId)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ if (CollectionUtils.isEmpty(customerAnalysisResultIdList)) {
|
|
|
|
|
+ marketingCampaignVOList.get(i).setCustomerList(new ArrayList<>());
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ List<CustomerAnalysisResultEntity> customerAnalysisResultEntityListI = customerAnalysisResultEntityList.stream()
|
|
|
|
|
+ .filter(customerAnalysisResultEntity -> customerAnalysisResultIdList.contains(customerAnalysisResultEntity.getId()))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
marketingCampaignVOList.get(i).setCustomerList(customerAnalysisResultEntityListI);
|
|
marketingCampaignVOList.get(i).setCustomerList(customerAnalysisResultEntityListI);
|
|
|
}
|
|
}
|
|
|
|
|
|