营销短信查询统计记录
This commit is contained in:
@@ -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) {
|
if($sms_push_event_list) {
|
||||||
Log::info('营销短信发送失败成功统计开始->' . json_encode($sms_push_event_list));
|
Log::info('营销短信发送失败成功统计开始->' . json_encode($sms_push_event_list));
|
||||||
foreach ($sms_push_event_list as $k => $v) {
|
foreach ($sms_push_event_list as $k => $v) {
|
||||||
$result = Db::table('sms_push_event_record')
|
$result = Db::table('sms_push_event_record')
|
||||||
->where('event_id', $v['id']) // 统一筛选 event_id=2 的数据
|
->where('event_id', $v['id']) // 统一筛选 event_id=2 的数据
|
||||||
|
->where('type', 'sms')
|
||||||
->field([
|
->field([
|
||||||
// 1. event_id=2 的实际人数
|
// 1. event_id=2 的实际人数
|
||||||
'COUNT(*) AS total_count',
|
'COUNT(*) AS total_count',
|
||||||
|
|||||||
Reference in New Issue
Block a user