init
This commit is contained in:
36
app/admin/model/Job.php
Executable file
36
app/admin/model/Job.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
use think\Model;
|
||||
use think\Request;
|
||||
use think\Config;
|
||||
|
||||
|
||||
class Job extends Model {
|
||||
|
||||
use \app\common\traits\AdminModel;
|
||||
|
||||
|
||||
public function getJobLists($where = null, $order = null, $field = null, $limit = null) {
|
||||
|
||||
if ($where) {
|
||||
$this->where($where);
|
||||
}
|
||||
if ($order) {
|
||||
$this->order($order);
|
||||
}
|
||||
if ($field) {
|
||||
$this->field($field);
|
||||
}
|
||||
if (empty($limit)) {
|
||||
$limit = Config::get('list_rows');
|
||||
}
|
||||
//$this->fetchsql(true);
|
||||
$object = $this->paginate($limit);
|
||||
// header("content-type:text/html;charset=utf8;");
|
||||
// print_r($object);
|
||||
// exit;
|
||||
return $object;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user