Преглед изворни кода

fix #6164: 导出Excel时updateTime使用formatUpdateTime保持与列表一致

- getOverview: (yesterdayUds?.updatedAt ?? account.updatedAt).toISOString()
  改为 this.formatUpdateTime(),与列表页面显示格式一致
- getStatisticsByPlatform: latestUpdate.toISOString()
  改为 this.formatUpdateTime(),保持时间格式统一
ethanfly пре 2 дана
родитељ
комит
ca9dd1cb11
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      server/src/services/WorkDayStatisticsService.ts

+ 2 - 2
server/src/services/WorkDayStatisticsService.ts

@@ -589,7 +589,7 @@ export class WorkDayStatisticsService {
         likesCount: stat?.likesCount ?? 0,
         commentsCount: stat?.commentsCount ?? 0,
         collectsCount: stat?.collectsCount ?? 0,
-        updateTime: latestUpdate ? latestUpdate.toISOString() : undefined,
+        updateTime: latestUpdate ? this.formatUpdateTime(latestUpdate) : undefined,
       };
     });
 
@@ -883,7 +883,7 @@ export class WorkDayStatisticsService {
       const accountYesterdayLikes = yesterdayUds?.likeCount ?? 0;
       const accountYesterdayFansIncrease = yesterdayUds?.fansIncrease ?? 0;
 
-      const updateTime = (yesterdayUds?.updatedAt ?? account.updatedAt).toISOString();
+      const updateTime = this.formatUpdateTime(yesterdayUds?.updatedAt ?? account.updatedAt ?? new Date());
 
       accountList.push({
         id: account.id,