|
@@ -392,6 +392,12 @@ export class WorkService {
|
|
|
commentCount: workItem.commentCount ?? work.commentCount,
|
|
commentCount: workItem.commentCount ?? work.commentCount,
|
|
|
shareCount: workItem.shareCount ?? work.shareCount,
|
|
shareCount: workItem.shareCount ?? work.shareCount,
|
|
|
collectCount: workItem.collectCount ?? work.collectCount,
|
|
collectCount: workItem.collectCount ?? work.collectCount,
|
|
|
|
|
+ // Bug #6154: 同步作品时同步更新 yesterday_* 字段,确保「作品数据」页能立即看到最新数据
|
|
|
|
|
+ yesterdayPlayCount: workItem.playCount ?? work.playCount,
|
|
|
|
|
+ yesterdayLikeCount: workItem.likeCount ?? work.likeCount,
|
|
|
|
|
+ yesterdayCommentCount: workItem.commentCount ?? work.commentCount,
|
|
|
|
|
+ yesterdayShareCount: workItem.shareCount ?? work.shareCount,
|
|
|
|
|
+ yesterdayCollectCount: workItem.collectCount ?? work.collectCount,
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
// 创建新作品
|
|
// 创建新作品
|
|
@@ -411,6 +417,12 @@ export class WorkService {
|
|
|
commentCount: workItem.commentCount || 0,
|
|
commentCount: workItem.commentCount || 0,
|
|
|
shareCount: workItem.shareCount || 0,
|
|
shareCount: workItem.shareCount || 0,
|
|
|
collectCount: workItem.collectCount || 0,
|
|
collectCount: workItem.collectCount || 0,
|
|
|
|
|
+ // Bug #6154: 创建作品时初始化 yesterday_* 字段,确保「作品数据」页能显示数据
|
|
|
|
|
+ yesterdayPlayCount: workItem.playCount || 0,
|
|
|
|
|
+ yesterdayLikeCount: workItem.likeCount || 0,
|
|
|
|
|
+ yesterdayCommentCount: workItem.commentCount || 0,
|
|
|
|
|
+ yesterdayShareCount: workItem.shareCount || 0,
|
|
|
|
|
+ yesterdayCollectCount: workItem.collectCount || 0,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
await this.workRepository.save(work);
|
|
await this.workRepository.save(work);
|