|
|
@@ -561,7 +561,7 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
}
|
|
|
}
|
|
|
// 保护时间 DESC 排序
|
|
|
- List<com.storlead.trade.vo.MarketEmailsProtectVO> voList = new java.util.ArrayList<>(aggMap.values());
|
|
|
+ List<MarketEmailsProtectVO> voList = new java.util.ArrayList<>(aggMap.values());
|
|
|
voList.sort((a, b) -> {
|
|
|
if (a.getProtectTime() == null && b.getProtectTime() == null) return 0;
|
|
|
if (a.getProtectTime() == null) return 1;
|
|
|
@@ -571,21 +571,21 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
|
|
|
// 批量回填客户名
|
|
|
if (!voList.isEmpty()) {
|
|
|
- java.util.Set<Long> customerIdSet = new java.util.LinkedHashSet<>();
|
|
|
- for (com.storlead.trade.vo.MarketEmailsProtectVO v : voList) {
|
|
|
+ Set<Long> customerIdSet = new LinkedHashSet<>();
|
|
|
+ for (MarketEmailsProtectVO v : voList) {
|
|
|
if (v.getCustomerId() != null) customerIdSet.add(v.getCustomerId());
|
|
|
}
|
|
|
if (!customerIdSet.isEmpty()) {
|
|
|
try {
|
|
|
- java.util.List<com.storlead.trade.entity.CustomerEntity> customers =
|
|
|
- customerTradeService.listByIds(new java.util.ArrayList<>(customerIdSet));
|
|
|
- java.util.Map<Long, com.storlead.trade.entity.CustomerEntity> customerMap = new java.util.HashMap<>();
|
|
|
+ List<CustomerEntity> customers =
|
|
|
+ customerTradeService.listByIds(new ArrayList<>(customerIdSet));
|
|
|
+ Map<Long, CustomerEntity> customerMap = new HashMap<>();
|
|
|
if (!CollectionUtils.isEmpty(customers)) {
|
|
|
for (com.storlead.trade.entity.CustomerEntity c : customers) {
|
|
|
if (c.getId() != null) customerMap.put(c.getId(), c);
|
|
|
}
|
|
|
}
|
|
|
- for (com.storlead.trade.vo.MarketEmailsProtectVO v : voList) {
|
|
|
+ for (MarketEmailsProtectVO v : voList) {
|
|
|
com.storlead.trade.entity.CustomerEntity c = customerMap.get(v.getCustomerId());
|
|
|
if (c != null) {
|
|
|
v.setCustomerName(c.getCustomerName());
|