diff --git a/application/common/PromotionService.php b/application/common/PromotionService.php index c5b1ad2e..9e0b3bb0 100644 --- a/application/common/PromotionService.php +++ b/application/common/PromotionService.php @@ -253,9 +253,13 @@ class PromotionService 'send_time' => $now, ]); 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) { - 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'); } else {