Pārlūkot izejas kodu

提取pid-更新

zhaozhen 2 gadi atpakaļ
vecāks
revīzija
84bec9f9b2
2 mainītis faili ar 4 papildinājumiem un 5 dzēšanām
  1. 2 2
      app/Models/MassMsg.php
  2. 2 3
      app/Models/MomentTask.php

+ 2 - 2
app/Models/MassMsg.php

@@ -102,7 +102,7 @@ class MassMsg extends Model
102 102
 
103 103
         $count = $query->count();
104 104
 
105
-        $list = $query->selectRaw('id as rule_id, pid, admin_id, corpid, name, send_type, send_time, content, attachments, enable, estimated_user , created_at, updated_at')
105
+        $list = $query->selectRaw('id as rule_id, pids, admin_id, corpid, name, send_type, send_time, content, attachments, enable, estimated_user , created_at, updated_at')
106 106
             ->orderBy($sortColumn, 'desc')->offset(($page - 1) * $pageSize)->limit($pageSize)->get();
107 107
 
108 108
         return [$list, $count];
@@ -135,7 +135,7 @@ class MassMsg extends Model
135 135
             $query->where('send_time', '<=', $sendTimeEnd.' 23:59:59');
136 136
         }
137 137
 
138
-        $data = $query->select('id', 'pid')->get();
138
+        $data = $query->select('id', 'pids')->get();
139 139
 
140 140
         $ruleIds = $data->pluck('id');
141 141
 

+ 2 - 3
app/Models/MomentTask.php

@@ -85,7 +85,7 @@ class MomentTask extends Model
85 85
 
86 86
         $count = $query->count();
87 87
 
88
-        $list = $query->selectRaw('id as rule_id, pid, admin_id, corpid, name, send_type, send_time, content, attachments, enable, status, estimated_user, filter_type,created_at, updated_at')
88
+        $list = $query->selectRaw('id as rule_id, pids, admin_id, corpid, name, send_type, send_time, content, attachments, enable, status, estimated_user, filter_type,created_at, updated_at')
89 89
             ->orderBy($sortColumn, 'desc')->offset(($page - 1) * $pageSize)->limit($pageSize)->get();
90 90
 
91 91
         return [$list, $count];
@@ -118,7 +118,7 @@ class MomentTask extends Model
118 118
             $query->where('send_time', '<=', $sendTimeEnd. ' 23:59:59');
119 119
         }
120 120
 
121
-        $data = $query->select('id', 'pid')->get();
121
+        $data = $query->select('id', 'pids')->get();
122 122
 
123 123
         $ruleIds = $data->pluck('id');
124 124
          # 统计发送信息
@@ -140,7 +140,6 @@ class MomentTask extends Model
140 140
             $pids = array_merge($pids, $itemPids);
141 141
         }
142 142
 
143
-        $pids = array_filter($pids);
144 143
         if( !empty($pids) ){
145 144
             $popu_data = MassPopularizData::selectRaw('sum(viewUv) as viewUv, sum(payPv) as payPv, sum(payUv) as payUv, sum(payMoney) as payMoney')->whereIn('pid', $pids)->first();
146 145