This commit is contained in:
wangyidong
2015-12-22 15:10:55 +08:00
parent b49fae3d74
commit b6e4fc2e41

View File

@@ -1311,7 +1311,7 @@ class storyModel extends model
public function getProjectStories($projectID = 0, $orderBy = 'pri_asc,id_desc', $type = 'byModule', $param = 0, $pager = null)
{
$modules = ($type == 'byModule' and $param) ? $this->dao->select('*')->from(TABLE_MODULE)->where('path')->like("%,$param,%")->andWhere('type')->eq('story')->fetchPairs('id', 'id') : array();
$stories = $this->dao->select('t1.*, t2.*,t3.branch as productBranch,t4.type as productType')->from(TABLE_PROJECTSTORY)->alias('t1')
$stories = $this->dao->select('t1.*, t2.*,t3.branch as productBranch,t4.type as productType, t2.version as version')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t3')->on('t1.project = t3.project')
->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t2.product = t4.id')