diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 59c50599..9a3d80b5 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -1079,6 +1079,7 @@ class Admin_DownController extends Zend_Controller_Action $show =(int)$this->_getParam('show'); $search = $this->_getParam('search'); $keyword = $this->view->keyword = $this->_getParam('keyword'); + $submd=$this->view->config->sub->metadata; if(empty($show)) { @@ -1086,6 +1087,7 @@ class Admin_DownController extends Zend_Controller_Action $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.uuid in (select uuid from $submd)"); ->where('o.userid = u.id'); if(!empty($search) && !empty($keyword)) { @@ -1111,7 +1113,7 @@ class Admin_DownController extends Zend_Controller_Action { $select=$this->db->select(); $select->from('dataorder as o',array('id','ts_created','userid','offlineappid','onlineappid')) - ->joinLeft('metadata as m', 'o.uuid = m.uuid', array('title','uuid','filesize')) + ->joinLeft($submd.' as m', 'o.uuid = m.uuid', array('title','uuid','filesize')) ->joinLeft('users as u','u.id=o.userid',array('realname as username')) ->where('o.userid = ?', $show) ->where('o.status=0 or o.status=5')