修改状态

This commit is contained in:
邹景立 2021-03-24 15:48:29 +08:00
parent 2b0dea961c
commit 5353363c4f
2 changed files with 6 additions and 2 deletions

View File

@ -76,7 +76,9 @@ class User extends Controller
]);
$newPath = rtrim($path, '-') . "-{$user['id']}-";
$oldPath = rtrim($user['path'], '-') . "-{$user['id']}-";
$this->app->db->name('DataUser')->whereLike('path', "{$oldPath}%")->ex;
$this->app->db->name('DataUser')->whereLike('path', "{$oldPath}%")->update([
'path' => $this->app->db->raw("rep"),
]);
});
$this->success('修改推荐人成功!');
} catch (\think\exception\HttpResponseException $exception) {

View File

@ -83,7 +83,9 @@ abstract class Auth extends Controller
*/
protected function checkUserStatus()
{
if (empty($this->user['status'])) {
$this->error('抱歉,账户已被冻结!');
}
}
}