Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
b3c34abd
Commit
b3c34abd
authored
Mar 26, 2021
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户管理
parent
3e80add8
Pipeline
#14041
passed with stages
in 3 minutes 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
UserModel.php
app/Model/UserModel.php
+3
-4
No files found.
app/Model/UserModel.php
View file @
b3c34abd
...
@@ -47,10 +47,9 @@ class UserModel extends Authenticatable
...
@@ -47,10 +47,9 @@ class UserModel extends Authenticatable
}
}
$users
=
DB
::
connection
(
'mongodb'
)
->
collection
(
'users'
)
->
where
(
$where
)
$users
=
DB
::
connection
(
'mongodb'
)
->
collection
(
'users'
)
->
where
(
$where
)
->
where
(
"is_del"
,
"!="
,
1
)
->
paginate
(
10
);
->
paginate
(
10
);
// foreach ( $users as $user){
// foreach ( $users as $user){
// $idArr = ($user['_id'])->jsonSerialize();
// $idArr = ($user['_id'])->jsonSerialize();
// $user['_id'] = $idArr['$oid'];
// $user['_id'] = $idArr['$oid'];
...
@@ -146,9 +145,9 @@ class UserModel extends Authenticatable
...
@@ -146,9 +145,9 @@ class UserModel extends Authenticatable
if
(
empty
(
$user
)){
if
(
empty
(
$user
)){
throw
new
\Exception
(
'用户不存在'
);
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
){
}
catch
(
\Exception
$exception
){
throw
new
\Exception
(
$exception
->
getMessage
());
throw
new
\Exception
(
$exception
->
getMessage
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment