作者 邓超

Merge remote-tracking branch 'origin/master'

... ... @@ -112,20 +112,24 @@ class Job extends Base {
$page = app()->request('page', 1, 'intval');
$limit = app()->request('limit', 20, 'intval');
$jobId = app()->request('id', 0, 'intval');
$status = app()->request('status');
if (!$jobId) {
app()->e('send_job_id_null_error');
}
$where = dbWhere([
$whereArray = [
'job_id' => $jobId
]);
];
if ($status || $status === 0) {
$whereArray['status'] = $status;
}
$where = dbWhere($whereArray);
$lists = db()->all(sendJobStatusSql::detail($where, $page, $limit));
return listsPage($lists,
db()->count(sendJobStatusSql::count($jobId))
, 1, 20);
db()->count(sendJobStatusSql::detailCount($where))
, $page, $limit);
}
... ...
... ... @@ -56,4 +56,15 @@ class sendJobStatusSql {
}
/**
* 详情页统计
* @param string $where
* @return string
* @author:dc
* @time 2023/4/11 16:13
*/
public static function detailCount(string $where):string {
return "select count(`id`) from `".static::$table."` where ".$where;
}
}
... ...