|
@@ -365,16 +365,13 @@ public class DataDashboardService {
|
|
|
return;
|
|
|
}
|
|
|
PublishContent publishContent = null;
|
|
|
+ List<String> hisPublishTimeStrList = publishTimeContentMap.keySet().stream()
|
|
|
+ .map(o -> DateUtils.timestampToYMDStr(o / 1000, "yyyyMMdd")).collect(Collectors.toList());
|
|
|
+ String publishTime = DateUtils.findNearestDate(hisPublishTimeStrList, date, "yyyyMMdd");
|
|
|
for (Map.Entry<Long, PublishContent> entry : publishTimeContentMap.entrySet()) {
|
|
|
- String publishTime = DateUtils.timestampToYMDStr(entry.getKey() / 1000, "yyyyMMdd");
|
|
|
- if (publishTime.equals(date)) {
|
|
|
- if (Objects.nonNull(publishContent)) {
|
|
|
- if (publishContent.getPublishTimestamp() < entry.getValue().getPublishTimestamp()) {
|
|
|
- publishContent = entry.getValue();
|
|
|
- }
|
|
|
- } else {
|
|
|
- publishContent = entry.getValue();
|
|
|
- }
|
|
|
+ String str = DateUtils.timestampToYMDStr(entry.getKey() / 1000, "yyyyMMdd");
|
|
|
+ if (publishTime.equals(str)) {
|
|
|
+ publishContent = entry.getValue();
|
|
|
}
|
|
|
}
|
|
|
if (Objects.isNull(publishContent)) {
|
|
@@ -847,7 +844,8 @@ public class DataDashboardService {
|
|
|
}
|
|
|
Map<String, List<ArticleDetailInfo>> articleDetailInfoMap = articleDetailInfoList.stream()
|
|
|
.collect(Collectors.groupingBy(ArticleDetailInfo::getWxSn));
|
|
|
- List<PublishSortLog> publishSortLogList = publishSortLogRepository.findByDateStrGreaterThanEqual(dateStr);
|
|
|
+ String lessDateStr = DateUtils.getBeforeDayStr(dateStr, "yyyyMMdd", 7);
|
|
|
+ List<PublishSortLog> publishSortLogList = publishSortLogRepository.findByDateStrGreaterThanEqual(lessDateStr);
|
|
|
Map<String, Map<String, Map<Integer, PublishSortLog>>> publishSortLogMap = publishSortLogList.stream()
|
|
|
.collect(Collectors.groupingBy(PublishSortLog::getGhId,
|
|
|
Collectors.groupingBy(PublishSortLog::getDateStr, Collectors.toMap(
|
|
@@ -898,16 +896,16 @@ public class DataDashboardService {
|
|
|
}
|
|
|
|
|
|
private boolean checkIsAigcPublish(Article article,
|
|
|
- Map<String, Map<String, Map<Integer, PublishSortLog>>> publishSortLogMap
|
|
|
- ) {
|
|
|
- String publishDateStr = DateUtils.timestampToYMDStr(article.getUpdateTime(), "yyyyMMdd");
|
|
|
+ Map<String, Map<String, Map<Integer, PublishSortLog>>> publishSortLogMap) {
|
|
|
Map<String, Map<Integer, PublishSortLog>> dateSortMap = publishSortLogMap.get(article.getGhId());
|
|
|
if (Objects.nonNull(dateSortMap)) {
|
|
|
- Map<Integer, PublishSortLog> indexMap = dateSortMap.get(publishDateStr);
|
|
|
- if (Objects.nonNull(indexMap)) {
|
|
|
- PublishSortLog log = indexMap.get(article.getItemIndex());
|
|
|
- if (Objects.nonNull(log) && log.getTitle().equals(article.getTitle())) {
|
|
|
- return true;
|
|
|
+ for (String dateStr : dateSortMap.keySet()) {
|
|
|
+ Map<Integer, PublishSortLog> indexMap = dateSortMap.get(dateStr);
|
|
|
+ if (Objects.nonNull(indexMap)) {
|
|
|
+ PublishSortLog log = indexMap.get(article.getItemIndex());
|
|
|
+ if (Objects.nonNull(log) && log.getTitle().equals(article.getTitle())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|