+ add the pri feature.
This commit is contained in:
@@ -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')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user