推广频率更改,半个月发一封是可行的

This commit is contained in:
wangjinlei
2026-06-11 15:12:48 +08:00
parent 60c8b7d532
commit 4b20ffba85

View File

@@ -253,9 +253,13 @@ class PromotionService
'send_time' => $now, 'send_time' => $now,
]); ]);
Db::name('journal_email')->where('j_email_id', $account['j_email_id'])->setInc('today_sent'); Db::name('journal_email')->where('j_email_id', $account['j_email_id'])->setInc('today_sent');
// 仅外部 expert 库回写最近一次推广时间;内部 user 用 promotion_email_log.send_time 计频次 // 仅外部 expert 库回写最近一次推广时间与累计推广次数;内部 user 用 promotion_email_log.send_time 计频次
if ($audienceKind === 'expert' && intval($expert['expert_id']) > 0) { if ($audienceKind === 'expert' && intval($expert['expert_id']) > 0) {
Db::name('expert')->where('expert_id', $expert['expert_id'])->update(['state' => 1, 'ltime' => $now]); Db::name('expert')->where('expert_id', $expert['expert_id'])->update([
'state' => 1,
'ltime' => $now,
'times' => Db::raw('times+1'),
]);
} }
Db::name('promotion_task')->where('task_id', $taskId)->setInc('sent_count'); Db::name('promotion_task')->where('task_id', $taskId)->setInc('sent_count');
} else { } else {