实现用户下载记录的分平台控制

This commit is contained in:
wlx 2014-06-11 07:42:44 +00:00
parent 0b9de786bb
commit 6665c20700
1 changed files with 3 additions and 1 deletions

View File

@ -1079,6 +1079,7 @@ class Admin_DownController extends Zend_Controller_Action
$show =(int)$this->_getParam('show'); $show =(int)$this->_getParam('show');
$search = $this->_getParam('search'); $search = $this->_getParam('search');
$keyword = $this->view->keyword = $this->_getParam('keyword'); $keyword = $this->view->keyword = $this->_getParam('keyword');
$submd=$this->view->config->sub->metadata;
if(empty($show)) if(empty($show))
{ {
@ -1086,6 +1087,7 @@ class Admin_DownController extends Zend_Controller_Action
$select->from('dataorder as o','count(o.id) as num') $select->from('dataorder as o','count(o.id) as num')
->join('users as u', 'u.id = o.userid', array('realname','id as uid','unit')) ->join('users as u', 'u.id = o.userid', array('realname','id as uid','unit'))
->where('o.status=0 or o.status=5') ->where('o.status=0 or o.status=5')
->where("o.uuid in (select uuid from $submd)");
->where('o.userid = u.id'); ->where('o.userid = u.id');
if(!empty($search) && !empty($keyword)) if(!empty($search) && !empty($keyword))
{ {
@ -1111,7 +1113,7 @@ class Admin_DownController extends Zend_Controller_Action
{ {
$select=$this->db->select(); $select=$this->db->select();
$select->from('dataorder as o',array('id','ts_created','userid','offlineappid','onlineappid')) $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')) ->joinLeft('users as u','u.id=o.userid',array('realname as username'))
->where('o.userid = ?', $show) ->where('o.userid = ?', $show)
->where('o.status=0 or o.status=5') ->where('o.status=0 or o.status=5')