Commit 695811fcfd54c4fd437c4ba8de6486db26ec958c

Authored by teemitop
1 parent a4505428

日志修复bug

@@ -61,14 +61,16 @@ class System extends Common @@ -61,14 +61,16 @@ class System extends Common
61 if(Request::isAjax()){ 61 if(Request::isAjax()){
62 $data = Request::except('file'); 62 $data = Request::except('file');
63 $key = input('post.key') ? input('post.key') : ""; 63 $key = input('post.key') ? input('post.key') : "";
64 - 64 +
  65 + $channel = $data['channel'] ? $data['channel'] : 1;
  66 +
65 $where = ''; 67 $where = '';
66 $where .= $data['key'] ? " a.`name` LIKE '%".$data['key']."%'" : '1=1 '; 68 $where .= $data['key'] ? " a.`name` LIKE '%".$data['key']."%'" : '1=1 ';
67 $where .= $data['nickname'] ? " AND a.nickname LIKE '%".$data['nickname']."%'" : ''; 69 $where .= $data['nickname'] ? " AND a.nickname LIKE '%".$data['nickname']."%'" : '';
68 $data_time = $data['time'] ? explode(' - ', $data['time']) : array(date("Y-m-d 00:00:00"),date("Y-m-d H:i:s")); 70 $data_time = $data['time'] ? explode(' - ', $data['time']) : array(date("Y-m-d 00:00:00"),date("Y-m-d H:i:s"));
69 $where .= $data_time ? "AND a.cdate BETWEEN '".$data_time[0]."' AND '".$data_time[1]."'" : ''; 71 $where .= $data_time ? "AND a.cdate BETWEEN '".$data_time[0]."' AND '".$data_time[1]."'" : '';
70 - $where .= ($data['iden']!=-1) ? " AND a.identity = ".$data['iden'] : "";  
71 - $where .= ($data['channel'] && $data['channel']!=-1) ? " AND rel.type_id = ".$data['channel'] : ""; 72 + $where .= ($data['iden']!=NULL && $data['iden']!=-1) ? " AND a.identity = ".$data['iden'] : "";
  73 + $where .= ($channel!=-1) ? " AND rel.type_id = ".$channel : "";
72 74
73 $page = ($data['page'] - 1) * $data['limit']; 75 $page = ($data['page'] - 1) * $data['limit'];
74 $limit = $data['limit']; 76 $limit = $data['limit'];