+ add the pri feature.

This commit is contained in:
wangchunsheng
2009-10-27 08:09:01 +00:00
parent f4d3e885cf
commit 1896562213
7 changed files with 37 additions and 13 deletions
+14
View File
@@ -102,6 +102,20 @@ class taskModel extends model
->fetchAll();
}
/* 获得用户的任务列表。*/
public function getUserTasks($account, $status = 'all')
{
$sql = $this->dao->select('t1.*, t2.id as projectID, t2.name as projectName, t3.id as storyID, t3.title as storyTitle')
->from(TABLE_TASK)->alias('t1')
->leftjoin(TABLE_PROJECT)->alias('t2')
->on('t1.project = t2.id')
->leftjoin(TABLE_STORY)->alias('t3')
->on('t1.story = t3.id')
->where('t1.owner')->eq($account);
if($status != 'all') $sql->andwhere('t1.status')->in($status);
return $sql->fetchAll();
}
/* 获得用户的任务id=>name列表。*/
public function getUserTaskPairs($account, $status = 'all')
{