...
|
...
|
@@ -35,6 +35,24 @@ class Job extends Base { |
|
|
|
|
|
foreach ($lists as &$list){
|
|
|
$list['created_at'] = date('Y-m-d H:i:s',$list['send_time']);
|
|
|
|
|
|
// 检查状态
|
|
|
if($list['status'] === 1){
|
|
|
$total = db()->count(\Model\sendJobStatusSql::countSum($list['id']));
|
|
|
if($total && $total['t'] == $list['total']){
|
|
|
// 更新状态
|
|
|
db()->update(\Model\sendJobsSql::$table,[
|
|
|
'status' => 2,
|
|
|
'success' => $total['s'],
|
|
|
'error' => $total['e'],
|
|
|
],dbWhere(['id'=>$list['id']]));
|
|
|
$list['status'] = 2;
|
|
|
$list['error'] = $total['e'];
|
|
|
$list['success'] = $total['s'];
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return listsPage($lists,
|
...
|
...
|
|