From a7b9e63e70d2c6b565a142478f31231d4c3b3bd8 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 11 Jun 2014 08:04:43 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=A6=BB=E7=BA=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95=E7=9A=84=E5=88=86?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DownController.php | 5 +++-- application/module/Order/Manager/Application.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index 8f9b0617..3ee483a9 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -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(); diff --git a/application/module/Order/Manager/Application.php b/application/module/Order/Manager/Application.php index 898f40ef..b82e3ae8 100644 --- a/application/module/Order/Manager/Application.php +++ b/application/module/Order/Manager/Application.php @@ -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))