|
|
@@ -601,7 +601,7 @@ export class MessageRecordService {
|
|
|
}
|
|
|
pipeline.push({
|
|
|
$match: {
|
|
|
- actualSendAt: {
|
|
|
+ createdAt: {
|
|
|
$gte: startDate,
|
|
|
$lte: endDate,
|
|
|
},
|
|
|
@@ -610,7 +610,7 @@ export class MessageRecordService {
|
|
|
} else if (startDate) {
|
|
|
pipeline.push({
|
|
|
$match: {
|
|
|
- actualSendAt: {
|
|
|
+ createdAt: {
|
|
|
$gte: startDate,
|
|
|
},
|
|
|
},
|
|
|
@@ -618,7 +618,7 @@ export class MessageRecordService {
|
|
|
} else if (endDate) {
|
|
|
pipeline.push({
|
|
|
$match: {
|
|
|
- actualSendAt: {
|
|
|
+ createdAt: {
|
|
|
$lte: endDate,
|
|
|
},
|
|
|
},
|
|
|
@@ -626,12 +626,12 @@ export class MessageRecordService {
|
|
|
}
|
|
|
|
|
|
pipeline.push(
|
|
|
- // 1. 将 actualSendAt 字段转换为日期,忽略时分秒
|
|
|
+ // 1. 将 createdAt 字段转换为日期,忽略时分秒
|
|
|
{
|
|
|
$project: {
|
|
|
_id: 0,
|
|
|
date: {
|
|
|
- $dateTrunc: { date: "$actualSendAt", unit: "day", timezone: "America/Los_Angeles" },
|
|
|
+ $dateTrunc: { date: "$createdAt", unit: "day", timezone: "America/Los_Angeles" },
|
|
|
},
|
|
|
status: "$status",
|
|
|
inforeground: "$inforeground",
|