revert last change except fixoffline
This commit is contained in:
parent
833bde8c1d
commit
50b7d77103
|
@ -312,7 +312,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
|
||||
}//查看单条记录
|
||||
$select=$this->db->select();
|
||||
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null and status>=0')->order('ts_created desc');
|
||||
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('ts_created desc');
|
||||
$paginator = Zend_Paginator::factory($select);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
|
@ -379,8 +379,9 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
if(empty($show))
|
||||
{
|
||||
$select=$this->db->select();
|
||||
$select->from('onlineapp as o','count(o.id) as num')
|
||||
->join('users as u', 'u.id = o.userid', array('realname','id as uid'))
|
||||
$select->from('dataorder as o','count(o.id) as num')
|
||||
->join('users as u', 'u.id = o.userid', array('realname','id as uid','unit'))
|
||||
->where('o.status=0 or o.status=5')
|
||||
->where('o.userid = u.id');
|
||||
if(!empty($search) && !empty($keyword))
|
||||
{
|
||||
|
@ -389,6 +390,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
}
|
||||
$select ->group('uid')
|
||||
->group('realname')
|
||||
->group('unit')
|
||||
->order('num desc');
|
||||
$paginator = Zend_Paginator::factory($select);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
|
@ -404,9 +406,11 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
elseif($show)
|
||||
{
|
||||
$select=$this->db->select();
|
||||
$select->from('onlineapp as o',array('id','username','ts_created','userid'))
|
||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||
$select->from('dataorder as o',array('id','ts_created','userid','offlineappid'))
|
||||
->joinLeft('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||
->joinLeft('users as u','u.id=o.userid',array('realname as username'))
|
||||
->where('o.userid = ?', $show)
|
||||
->where('o.status=0 or o.status=5')
|
||||
->order('o.id desc');
|
||||
$paginator = Zend_Paginator::factory($select);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
|
@ -439,7 +443,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
->where('o.uuid = m.uuid and (o.status=0 or o.status=5)');
|
||||
if(!empty($search) && !empty($keyword))
|
||||
{
|
||||
$select ->Where('m.title like ? ','%'.$keyword.'%');
|
||||
$select ->Where('m.title like ? or m.title_en like ?','%'.$keyword.'%');
|
||||
$this->view->title='“'.$keyword.'”的搜索结果 :';
|
||||
}
|
||||
$select ->group('m.title')
|
||||
|
@ -460,7 +464,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
elseif($show)
|
||||
{
|
||||
$select=$this->db->select();
|
||||
$select->from('dataorder as o',array('ts_created'))
|
||||
$select->from('dataorder as o',array('ts_created','ts_created','offlineappid'))
|
||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||
->join('users as u', 'o.userid=u.id',array('id as userid','username','realname'))
|
||||
->where('m.uuid = ? and (o.status=0 or o.status=5)', $show)
|
||||
|
@ -554,7 +558,6 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
$this->_helper->viewRenderer('update');
|
||||
|
||||
}
|
||||
|
||||
function fixofflineAction(){
|
||||
|
||||
$fix = $this->_getParam('fix');
|
||||
|
@ -623,6 +626,5 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
|
||||
|
||||
}//fixofflineAction 用户匹配
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue