实现离线数据服务记录的分平台处理

This commit is contained in:
wlx 2014-06-11 08:04:43 +00:00
parent 3231524aa1
commit a7b9e63e70
2 changed files with 4 additions and 2 deletions

View File

@ -727,6 +727,7 @@ class Admin_DownController extends Zend_Controller_Action
$undelete=$this->_getParam('undelete');
$emaillist=$this->_getParam('emaillist');
$monthreport=$this->_getParam('monthreport');
$submd=$this->view->config->sub->metadata;
if ($add) {
$form=new OfflinelogForm();
@ -867,9 +868,9 @@ class Admin_DownController extends Zend_Controller_Action
{
$sql = "select distinct(t.*) from
(
select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5)
select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5) and d.uuid in (select uuid from $submd)
union
select o.email from offlineapp o where o.userid is null and o.email is not null
select o.email from offlineapp o where o.userid is null and o.email is not null and o.id in (select offlineappid from dataorder where uuid in (select uuid from $submd))
) as t";
$re = $this->db->query($sql);
$rows = $re->fetchAll();

View File

@ -49,6 +49,7 @@ class Application
->where('ts_approved is not null')
->where('pdflink is not null')
->where('status>=0')
->where('id in (select offlineappid from dataorder where uuid in (select uuid from'.$this->config->sub->metadata.'))')
->order('ts_created desc');
if(!empty($this->keyword))