guoziyun 9 mēneši atpakaļ
vecāks
revīzija
b614db279a

+ 5 - 5
oms/dist/src/services/messageRecordService.js

@@ -584,7 +584,7 @@ class MessageRecordService {
                 }
                 pipeline.push({
                     $match: {
-                        actualSendAt: {
+                        createdAt: {
                             $gte: startDate,
                             $lte: endDate,
                         },
@@ -594,7 +594,7 @@ class MessageRecordService {
             else if (startDate) {
                 pipeline.push({
                     $match: {
-                        actualSendAt: {
+                        createdAt: {
                             $gte: startDate,
                         },
                     },
@@ -603,19 +603,19 @@ class MessageRecordService {
             else if (endDate) {
                 pipeline.push({
                     $match: {
-                        actualSendAt: {
+                        createdAt: {
                             $lte: endDate,
                         },
                     },
                 });
             }
             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",

+ 5 - 5
oms/src/services/messageRecordService.ts

@@ -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",