fix: 三个询盘导入命令——未分到询盘的用户不再发送空汇总邮件
sendDigests 循环前校验该用户分配条数,为0则跳过并提示 "user N 未分到询盘,不发送"(询盘数少于人数时避免群发空邮件)。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -468,6 +468,10 @@ class HesuGoogleAiInquiryImportCommand extends Command
|
|||||||
$date = date('Y-m-d');
|
$date = date('Y-m-d');
|
||||||
|
|
||||||
foreach ($targetUserIds as $uid) {
|
foreach ($targetUserIds as $uid) {
|
||||||
|
if (count($digestGroups[(string)$uid] ?? []) === 0) {
|
||||||
|
$output->writeln('<comment>user ' . $uid . ' 未分到询盘,不发送</comment>');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($onlyUser > 0 && $uid !== $onlyUser) {
|
if ($onlyUser > 0 && $uid !== $onlyUser) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -351,6 +351,10 @@ class HesuGoogleInquiryImportCommand extends Command
|
|||||||
$date = date('Y-m-d');
|
$date = date('Y-m-d');
|
||||||
|
|
||||||
foreach ($targetUserIds as $uid) {
|
foreach ($targetUserIds as $uid) {
|
||||||
|
if (count($digestGroups[(string)$uid] ?? []) === 0) {
|
||||||
|
$output->writeln('<comment>user ' . $uid . ' 未分到询盘,不发送</comment>');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($onlyUser > 0 && $uid !== $onlyUser) {
|
if ($onlyUser > 0 && $uid !== $onlyUser) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,6 +387,10 @@ class HesuGoogleWhatsAppImportCommand extends Command
|
|||||||
$date = date('Y-m-d');
|
$date = date('Y-m-d');
|
||||||
|
|
||||||
foreach ($targetUserIds as $uid) {
|
foreach ($targetUserIds as $uid) {
|
||||||
|
if (count($digestGroups[(string)$uid] ?? []) === 0) {
|
||||||
|
$output->writeln('<comment>user ' . $uid . ' 未分到询盘,不发送</comment>');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($onlyUser > 0 && $uid !== $onlyUser) {
|
if ($onlyUser > 0 && $uid !== $onlyUser) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user