|
|
@@ -469,18 +469,13 @@ class UserLogic
|
|
|
|
|
|
private function modifypidByUpdateNextLevel($id, $userPid, $path, $pid, $parentUserPath)
|
|
|
{
|
|
|
+ $newPath = explode(',', $parentUserPath);
|
|
|
+ $newPath[] = $pid;
|
|
|
// 1. 修改$pidUser['pid'] = $idUser['pid'], $pidUser['path'] = $idUser['path']
|
|
|
- var_dump($pid,$userPid,$path);exit();
|
|
|
- User::modifyUserPidAndPath($pid, $userPid, $path);
|
|
|
+ User::modifyUserPidAndPath($id, $pid, implode(',', $newPath));
|
|
|
|
|
|
- User::update($id, ['pid' => $pid]);
|
|
|
-
|
|
|
- if (!empty($path)) {
|
|
|
- $path = explode(',', $path);
|
|
|
- } else {
|
|
|
- $path = [];
|
|
|
- }
|
|
|
- $this->iteraMidifyPathByPid($path, $pid);
|
|
|
+ // 迭代更新子级path
|
|
|
+ $this->iteraMidifyPathByPid($newPath, $id);
|
|
|
|
|
|
return true;
|
|
|
}
|