Update Log.php

This commit is contained in:
wolfcode
2023-06-30 01:23:00 +08:00
parent 13758ac2dd
commit 8b530a1834

View File

@@ -32,27 +32,13 @@ class Log extends AdminController
return $this->selectList();
}
[$page, $limit, $where, $excludeFields] = $this->buildTableParams(['month']);
$month = (isset($excludeFields['month']) && !empty($excludeFields['month']))
? date('Ym',strtotime($excludeFields['month']))
? date('Ym', strtotime($excludeFields['month']))
: date('Ym');
// todo TP6框架有一个BUG非模型名与表名不对应时name属性自定义withJoin生成的sql有问题
$count = $this->model
->setMonth($month)
->with('admin')
->where($where)
->select();
$list = $this->model
->setMonth($month)
->with('admin')
->where($where)
->page($page, $limit)
->order($this->sort)
->select();
$data = [
$model = $this->model->setMonth($month)->with('admin')->where($where);
$count = $model->count();
$list = $model->page($page, $limit)->order($this->sort)->select();
$data = [
'code' => 0,
'msg' => '',
'count' => $count,