diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index fa291af5..47d88014 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -609,7 +609,7 @@ class DataController extends Zend_Controller_Action $sql="select distinct(md.uuid),md.title from keyword kw left join normalmetadata md on kw.id=md.id where kw.keyword in (select k.keyword from keyword k left join metadata m on k.id=m.id where m.id=? and k.keytype='theme') and kw.id<>? limit 10"; $this->view->related=$this->db->fetchAll($sql,array($id,$id)); //用户下载记录 - $sql = "select o.ts_created,m.uuid,u.realname,u.unit,(oa.project || fa.project ) as project + $sql = "select o.ts_created,m.uuid,u.realname,u.unit,oa.project as onlineproject, fa.project as offlineproject from dataorder as o left join metadata as m on o.uuid = m.uuid left join users as u on o.userid=u.id left join onlineapp oa on o.onlineappid=oa.id left join offlineapp fa on o.offlineappid=fa.id where m.uuid = '$uuid' and (o.status=0 or o.status=5) and u.realname IS NOT NULL order by o.ts_created desc limit 10"; diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml index e890fa75..c1a4ee72 100755 --- a/application/default/views/scripts/heihe/view.phtml +++ b/application/default/views/scripts/heihe/view.phtml @@ -257,7 +257,10 @@ endforeach; downhistory as $v){ echo '
  • '.date("Y-m-d",strtotime($v->ts_created))." ".$v->unit." ".$v->realname; - if (!empty($v->project)) echo ' 用途:'.$v->project; + if (!empty($v->offlineproject)) + echo ' 用途:'.$v->offlineproject; + elseif (!empty($v->onlineproject)) + echo ' 用途:'.$v->onlineproject; echo '
  • '; } ?>