调整邮件询盘脚本
This commit is contained in:
@@ -431,12 +431,12 @@ class Emails
|
||||
$enterUser = User::where('id', $enterUserId)->first();
|
||||
|
||||
// 固定渠道
|
||||
$channel = 8;
|
||||
$channel = 12;
|
||||
$channelInfo = InquiryChannel::where('id', $channel)->first();
|
||||
|
||||
// 初始化 UID 轮询器
|
||||
$uidRotator = new \app\common\utils\RedisUidRotator('email_parsed_result_20250804');
|
||||
$uidRotator->setUids([64, 63, 83, 93, 108, 118, 132, 145, 150, 143, 156, 157, 158], false);
|
||||
$uidRotator->setUids([64, 63, 83, 93, 108, 132, 145, 150, 143, 156, 157, 158], false);
|
||||
|
||||
EmailParsedResult::where('status', 0)
|
||||
->chunkById($batchSize, function ($records) use ($delaySeconds, $throttleAfter, $throttleSeconds, $enterUser, $channelInfo, $uidRotator) {
|
||||
@@ -452,7 +452,13 @@ class Emails
|
||||
$assignedUid = $uidRotator->next();
|
||||
|
||||
// 获取分配的用户信息
|
||||
$recipientInfo = User::where('id', $assignedUid)->first();
|
||||
$recipientInfo = User::where('id', $assignedUid)->where('status', 1)->first();
|
||||
if (!$recipientInfo) {
|
||||
flg("用户ID=" . $assignedUid . " 不存在或已离职跳过分配,需要手动移除 UID");
|
||||
|
||||
$assignedUid = $uidRotator->next();
|
||||
$recipientInfo = User::where('id', $assignedUid)->where('status', 1)->first();
|
||||
}
|
||||
|
||||
// 生成录单
|
||||
$log = [
|
||||
|
||||
Reference in New Issue
Block a user