Merge branch 'release/zentaopms_18.3' of https://gitlab.zcorp.cc/easycorp/zentaopms into release/zentaopms_18.3

This commit is contained in:
tianshujie
2023-03-23 15:49:01 +08:00
3 changed files with 59 additions and 28 deletions
+4 -6
View File
@@ -2349,12 +2349,10 @@ class treeModel extends model
$module->order = $module->parent ? $parent->order : $data->order;
$this->dao->insert(TABLE_MODULE)->data($module)->exec();
$moduleID = $this->dao->lastInsertID();
if($module->parent)
{
$modulePath = $parent->path . "$moduleID,";
$this->dao->update(TABLE_MODULE)->set('path')->eq($modulePath)->where('id')->eq($moduleID)->limit(1)->exec();
}
$moduleID = $this->dao->lastInsertID();
$modulePath = "$moduleID,";
if($module->parent) $modulePath = $parent->path . $modulePath;
$this->dao->update(TABLE_MODULE)->set('path')->eq($modulePath)->where('id')->eq($moduleID)->limit(1)->exec();
return $this->getByID($moduleID);
}