From 89b9162f091a3c6708e4ebe0b2c2a85b306b9c4f Mon Sep 17 00:00:00 2001 From: mzl Date: Thu, 20 Aug 2026 15:18:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=89=E4=B8=AA=E8=AF=A2=E7=9B=98?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=91=BD=E4=BB=A4=E2=80=94=E2=80=94=E6=9C=AA?= =?UTF-8?q?=E5=88=86=E5=88=B0=E8=AF=A2=E7=9B=98=E7=9A=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=8F=91=E9=80=81=E7=A9=BA=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sendDigests 循环前校验该用户分配条数,为0则跳过并提示 "user N 未分到询盘,不发送"(询盘数少于人数时避免群发空邮件)。 Co-Authored-By: Claude --- app/command/HesuGoogleAiInquiryImportCommand.php | 4 ++++ app/command/HesuGoogleInquiryImportCommand.php | 4 ++++ app/command/HesuGoogleWhatsAppImportCommand.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/app/command/HesuGoogleAiInquiryImportCommand.php b/app/command/HesuGoogleAiInquiryImportCommand.php index 24c2db8..8a84d45 100644 --- a/app/command/HesuGoogleAiInquiryImportCommand.php +++ b/app/command/HesuGoogleAiInquiryImportCommand.php @@ -468,6 +468,10 @@ class HesuGoogleAiInquiryImportCommand extends Command $date = date('Y-m-d'); foreach ($targetUserIds as $uid) { + if (count($digestGroups[(string)$uid] ?? []) === 0) { + $output->writeln('user ' . $uid . ' 未分到询盘,不发送'); + continue; + } if ($onlyUser > 0 && $uid !== $onlyUser) { continue; } diff --git a/app/command/HesuGoogleInquiryImportCommand.php b/app/command/HesuGoogleInquiryImportCommand.php index b3ec0d7..c1b4350 100644 --- a/app/command/HesuGoogleInquiryImportCommand.php +++ b/app/command/HesuGoogleInquiryImportCommand.php @@ -351,6 +351,10 @@ class HesuGoogleInquiryImportCommand extends Command $date = date('Y-m-d'); foreach ($targetUserIds as $uid) { + if (count($digestGroups[(string)$uid] ?? []) === 0) { + $output->writeln('user ' . $uid . ' 未分到询盘,不发送'); + continue; + } if ($onlyUser > 0 && $uid !== $onlyUser) { continue; } diff --git a/app/command/HesuGoogleWhatsAppImportCommand.php b/app/command/HesuGoogleWhatsAppImportCommand.php index 0e2e22f..afdc2ad 100644 --- a/app/command/HesuGoogleWhatsAppImportCommand.php +++ b/app/command/HesuGoogleWhatsAppImportCommand.php @@ -387,6 +387,10 @@ class HesuGoogleWhatsAppImportCommand extends Command $date = date('Y-m-d'); foreach ($targetUserIds as $uid) { + if (count($digestGroups[(string)$uid] ?? []) === 0) { + $output->writeln('user ' . $uid . ' 未分到询盘,不发送'); + continue; + } if ($onlyUser > 0 && $uid !== $onlyUser) { continue; }