init
This commit is contained in:
31
app/admin/model/ActionLog.php
Executable file
31
app/admin/model/ActionLog.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use think\Request;
|
||||
use think\Config;
|
||||
|
||||
class ActionLog extends Model {
|
||||
|
||||
use \app\common\traits\AdminModel;
|
||||
|
||||
public function getPageLists($where = null, $order = null, $field = null, $limit = null, $level = 0) {
|
||||
$this->alias('al')->join('user u', 'al.user_id=u.id', 'LEFT');
|
||||
if ($where) {
|
||||
$this->where($where);
|
||||
}
|
||||
if ($order) {
|
||||
$this->order($order);
|
||||
}
|
||||
if ($field) {
|
||||
$this->field($field);
|
||||
}
|
||||
if (empty($limit)) {
|
||||
$limit = Config::get('list_rows');
|
||||
}
|
||||
$object = $this->paginate($limit);
|
||||
return $object;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user