* Adjust return type of programplanModel::updateSubStageAttr().

This commit is contained in:
xushenjie
2023-05-12 07:48:44 +00:00
parent 1efcbc2f7a
commit 1825e640d1
+4 -2
View File
@@ -1320,9 +1320,9 @@ class programplanModel extends model
* @param int $planID
* @param string $attribute
* @access public
* @return true|null
* @return true
*/
public function updateSubStageAttr(int $planID, string $attribute): bool|null
public function updateSubStageAttr(int $planID, string $attribute): bool
{
if($attribute == 'mix') return true;
@@ -1330,11 +1330,13 @@ class programplanModel extends model
->where('parent')->eq($planID)
->andWhere('deleted')->eq(0)
->fetchAll('id');
if(empty($subStageList)) return true;
$this->dao->update(TABLE_EXECUTION)->set('attribute')->eq($attribute)->where('id')->in(array_keys($subStageList))->exec();
foreach($subStageList as $childID => $subStage) $this->updateSubStageAttr($childID, $attribute);
return true;
}
/**