From 8efbef8128fcc32298fbc7098d5f1d259e13ad69 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 22 Mar 2012 11:23:34 +0000 Subject: [PATCH] =?UTF-8?q?1.=20=E6=95=B0=E6=8D=AE=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=B8=AD=E7=A7=BB=E9=99=A4=E4=BA=86dataorder?= =?UTF-8?q?.status<0=E7=9A=84=E6=83=85=E5=86=B5=202.=20=E6=88=91=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0=E4=BA=86geonetwor?= =?UTF-8?q?k=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/AuthorController.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 1e6cf99d..ddd326fe 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -76,7 +76,7 @@ class AuthorController extends Zend_Controller_Action $sql = "SELECT o.id,o.userid,o.unit,o.username,o.ts_created,o.project,m.title,m.uuid FROM onlineapp as o LEFT JOIN metadata as m ON o.uuid=m.uuid LEFT JOIN mdauthor as a ON a.uuid=o.uuid - WHERE (o.id in (SELECT distinct(onlineappid) from dataorder)) AND a.userid = ? AND a.status=1 + WHERE (o.id in (SELECT distinct(onlineappid) from dataorder where status>=0)) AND a.userid = ? AND a.status=1 ORDER BY o.id desc"; $sth = $this->db->prepare($sql); @@ -284,7 +284,7 @@ class AuthorController extends Zend_Controller_Action left join mdauthor a on a.uuid=d.uuid LEFT JOIN offlineapp offa on offa.id=d.offlineappid LEFT JOIN onlineapp ona on ona.id=d.onlineappid - WHERE (offa.id IS NOT NULL OR ona.id IS NOT NULL) AND a.status=1 + WHERE (offa.id IS NOT NULL OR ona.id IS NOT NULL) AND a.status=1 and d.status>=0 AND d.uuid=? AND a.userid=? ORDER BY d.ts_created DESC"; @@ -430,8 +430,9 @@ class AuthorController extends Zend_Controller_Action //列表 if(empty($ac) || $ac=='list'){ - $sql = "SELECT a.*,m.title,m.description FROM normalmetadata m - LEFT JOIN mdauthor a ON m.uuid=a.uuid + $sql = "SELECT a.*,m.title,m.description,g.id as gid FROM normalmetadata m + LEFT JOIN mdauthor a ON m.uuid=a.uuid + left join geonetworkmetadata g on m.uuid=g.uuid WHERE a.userid=? AND status>=0 ORDER BY status DESC,a.id DESC "; @@ -1175,7 +1176,7 @@ class AuthorController extends Zend_Controller_Action { $sql = "SELECT md.title,c.author,c.email,c.url,c.ts_created,c.content FROM comments c LEFT JOIN mdauthor a ON a.uuid=c.uuid - LEFT JOIN metadata md ON md.uuid=c.uuid + LEFT JOIN normalmetadata md ON md.uuid=c.uuid WHERE a.userid=? ORDER BY ts_created DESC";