Commit b3c34abd by 杨昕

用户管理

parent 3e80add8
Pipeline #14041 passed with stages
in 3 minutes 53 seconds
......@@ -47,10 +47,9 @@ class UserModel extends Authenticatable
}
$users = DB::connection('mongodb')->collection('users')->where($where)
->where("is_del","!=",1)
->paginate(10);
// foreach ( $users as $user){
// $idArr = ($user['_id'])->jsonSerialize();
// $user['_id'] = $idArr['$oid'];
......@@ -146,9 +145,9 @@ class UserModel extends Authenticatable
if (empty($user)){
throw new \Exception('用户不存在');
}
$flag = UserModel::where('_id',$id)->delete();
$flag = UserModel::where('_id',$id)->update(["is_del"=>1]);
RecycleModel::addRecycle($id,"users");
//RecycleModel::addRecycle($id,"user");
}catch (\Exception $exception){
throw new \Exception($exception->getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment