|
@@ -41,20 +41,17 @@ class Syslog extends Base_Controller {
|
|
|
S.is_read";
|
|
|
|
|
|
if (empty($download)) {
|
|
|
+ $join = array();
|
|
|
+ $join[] = ['table'=>'user as U','cond'=>'U.id = S.userid','type'=>'left'];
|
|
|
if (isset($print) && !empty($print)) {
|
|
|
- // $data = $this->Syslog_model->get_list_by_join($where=NULL, $fields='*',$limit=NULL, $offset=NULL, $join = NULL, $order=NULL, $group=NUll, $alias=NULL);
|
|
|
- // $data = $this->Syslog_model->get_list_by_join($filter,$page,$count,$field,1);
|
|
|
- var_dump('expression');
|
|
|
+ $data = $this->Syslog_model->get_list_by_join($filter, $field,3000, 0, $join, 'time DESC,id DESC', NUll, 'S');
|
|
|
}else{
|
|
|
- $join = array();
|
|
|
- $join[] = ['table'=>'user as U','cond'=>'U.id = S.userid','type'=>'left'];
|
|
|
+
|
|
|
$data = $this->Syslog_model->get_list_by_join($filter, $field,$limit, $offset, $join, 'time DESC,id DESC', NUll, 'S');
|
|
|
- // var_dump($this->db->last_query());die;
|
|
|
- // $data = $this->Syslog_model->getList($filter,$page,$count,$field);
|
|
|
}
|
|
|
-
|
|
|
+ $total = $this->Syslog_model->get_list_by_multi_join($filter, 'count(*) as total',null, null, $join, 'time DESC,id DESC', NUll, 'S',true);
|
|
|
$data = empty($data) ? array() : $data;
|
|
|
- $total = $this->Syslog_model->getTotal($filter);
|
|
|
+ $total = $total['total'];
|
|
|
|
|
|
foreach ($data as &$v) {
|
|
|
$v['username'] = empty($v['username']) ? '' : $v['username'];
|