|
|
|
@ -646,6 +646,11 @@ class User extends BaseController |
|
|
|
|
return app('json')->fail('不能选自己'); |
|
|
|
|
if ($spid && !$this->repository->exists($spid)) |
|
|
|
|
return app('json')->fail('推荐人不存在'); |
|
|
|
|
$spreadUser = $this->repository->get($spid); |
|
|
|
|
if($spreadUser['spread_uid'] == $id){ |
|
|
|
|
return app('json')->fail('不能设置相互推荐'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$this->repository->changeSpread($id, $spid, $this->request->adminId()); |
|
|
|
|
return app('json')->success('修改成功'); |
|
|
|
|
} |
|
|
|
|