正在显示
1 个修改的文件
包含
18 行增加
和
0 行删除
| @@ -35,6 +35,24 @@ class Job extends Base { | @@ -35,6 +35,24 @@ class Job extends Base { | ||
| 35 | 35 | ||
| 36 | foreach ($lists as &$list){ | 36 | foreach ($lists as &$list){ | 
| 37 | $list['created_at'] = date('Y-m-d H:i:s',$list['send_time']); | 37 | $list['created_at'] = date('Y-m-d H:i:s',$list['send_time']); | 
| 38 | + | ||
| 39 | + // 检查状态 | ||
| 40 | + if($list['status'] === 1){ | ||
| 41 | + $total = db()->count(\Model\sendJobStatusSql::countSum($list['id'])); | ||
| 42 | + if($total && $total['t'] == $list['total']){ | ||
| 43 | + // 更新状态 | ||
| 44 | + db()->update(\Model\sendJobsSql::$table,[ | ||
| 45 | + 'status' => 2, | ||
| 46 | + 'success' => $total['s'], | ||
| 47 | + 'error' => $total['e'], | ||
| 48 | + ],dbWhere(['id'=>$list['id']])); | ||
| 49 | + $list['status'] = 2; | ||
| 50 | + $list['error'] = $total['e']; | ||
| 51 | + $list['success'] = $total['s']; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + } | ||
| 55 | + | ||
| 38 | } | 56 | } | 
| 39 | 57 | ||
| 40 | return listsPage($lists, | 58 | return listsPage($lists, | 
- 
请 注册 或 登录 后发表评论