*Fix task bug.

This commit is contained in:
songchenxuan
2021-12-30 14:51:33 +08:00
parent 898709ef8b
commit ea34d06dad
+2 -1
View File
@@ -277,11 +277,12 @@ class treeModel extends model
{
foreach($rootModules as $id => $rootModule)
{
$activeBranch = isset($branchGroups[$id]) ? array_keys($branchGroups[$id]) : array();
if($type == 'product')
{
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task' and parent != 0) OR (root = $id and type = 'story'))")
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->andWhere('branch')->in(array_keys($branchGroups[$id]))
->beginIF(!empty($activeBranch))->andWhere('branch')->in($activeBranch)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, branch, `order`, type')
->fetchAll('id');