作者 邓超

x

... ... @@ -24,11 +24,20 @@ class Job extends Base {
*/
public function index(){
$lists = db()->all(sendJobsSql::all(dbWhere([
$page = app()->request('page',1,'intval');
$limit = app()->request('limit',20,'intval');
$where = dbWhere([
'email_id' => $this->getEmails('id')
])));
]);
$lists = db()->all(sendJobsSql::all($where,$page,$limit));
return $lists;
return listsPage($lists,
db()->count(sendJobsSql::count($where))
,1,20);
}
... ...
... ... @@ -45,6 +45,17 @@ class sendJobsSql {
}
/**
* 统计
* @param string $where
* @return string
* @author:dc
* @time 2023/4/17 16:44
*/
public static function count(string $where):string {
return "select count(`id`) from `".static::$table."` where ".$where;
}
/**
* 某个任务是否暂停了
* @param int $id
* @return bool
... ...