|
@@ -1055,8 +1055,8 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public Map<Long, MarketEmailsAccountStatsVO> getAccountStats(List<Long> outboxIds) {
|
|
|
|
|
- Map<Long, MarketEmailsAccountStatsVO> result = new LinkedHashMap<>();
|
|
|
|
|
|
|
+ public List<MarketEmailsAccountStatsVO> getAccountStats(List<Long> outboxIds) {
|
|
|
|
|
+ List<MarketEmailsAccountStatsVO> result = new ArrayList<>();
|
|
|
if (CollectionUtils.isEmpty(outboxIds)) {
|
|
if (CollectionUtils.isEmpty(outboxIds)) {
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
@@ -1064,8 +1064,11 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
if (ids.isEmpty()) {
|
|
if (ids.isEmpty()) {
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+ Map<Long, MarketEmailsAccountStatsVO> byId = new LinkedHashMap<>();
|
|
|
for (Long id : ids) {
|
|
for (Long id : ids) {
|
|
|
- result.put(id, emptyAccountStats(id));
|
|
|
|
|
|
|
+ MarketEmailsAccountStatsVO vo = emptyAccountStats(id);
|
|
|
|
|
+ byId.put(id, vo);
|
|
|
|
|
+ result.add(vo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
QueryWrapper<MarketEmailsEntity> qw = new QueryWrapper<>();
|
|
QueryWrapper<MarketEmailsEntity> qw = new QueryWrapper<>();
|
|
@@ -1087,18 +1090,16 @@ public class MarketEmailsServiceImpl extends MyBaseServiceImpl<MarketEmailsMappe
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
Long id = toLongOrNull(row.get("outbox_id"));
|
|
Long id = toLongOrNull(row.get("outbox_id"));
|
|
|
- if (id == null || !result.containsKey(id)) {
|
|
|
|
|
|
|
+ MarketEmailsAccountStatsVO vo = id == null ? null : byId.get(id);
|
|
|
|
|
+ if (vo == null) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- MarketEmailsAccountStatsVO vo = new MarketEmailsAccountStatsVO();
|
|
|
|
|
int sendCount = toInteger(row.get("send_count"));
|
|
int sendCount = toInteger(row.get("send_count"));
|
|
|
int replyCount = toInteger(row.get("reply_count"));
|
|
int replyCount = toInteger(row.get("reply_count"));
|
|
|
- vo.setOutboxId(id);
|
|
|
|
|
vo.setSendCount(sendCount);
|
|
vo.setSendCount(sendCount);
|
|
|
vo.setReplyCount(replyCount);
|
|
vo.setReplyCount(replyCount);
|
|
|
vo.setReplyRate(toReplyRate(sendCount, replyCount));
|
|
vo.setReplyRate(toReplyRate(sendCount, replyCount));
|
|
|
vo.setLastSendTime(toDate(row.get("last_send_time")));
|
|
vo.setLastSendTime(toDate(row.get("last_send_time")));
|
|
|
- result.put(id, vo);
|
|
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|