营销短信查询统计记录
This commit is contained in:
parent
e88b220650
commit
72e98210e7
|
|
@ -136,12 +136,13 @@ class QuerySmsStatus extends Command
|
|||
}
|
||||
|
||||
// 营销短信发送失败成功统计
|
||||
$sms_push_event_list = Db::name('sms_push_event')->where(['status' => 1])->select()->toArray();
|
||||
$sms_push_event_list = Db::name('sms_push_event')->where(['status' => 1])->field('id')->select()->toArray();
|
||||
if($sms_push_event_list) {
|
||||
Log::info('营销短信发送失败成功统计开始->' . json_encode($sms_push_event_list));
|
||||
foreach ($sms_push_event_list as $k => $v) {
|
||||
$result = Db::table('sms_push_event_record')
|
||||
->where('event_id', $v['id']) // 统一筛选 event_id=2 的数据
|
||||
->where('type', 'sms')
|
||||
->field([
|
||||
// 1. event_id=2 的实际人数
|
||||
'COUNT(*) AS total_count',
|
||||
|
|
|
|||
Loading…
Reference in New Issue