Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a581cd18
authored
Nov 21, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加状态判断
parent
f66afe25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
app/Admin/Forms/User/AssignUserHandle.php
app/Admin/Forms/User/TransferUserHandle.php
app/Admin/Service/UserService.php
app/Admin/Forms/User/AssignUserHandle.php
View file @
a581cd18
...
...
@@ -32,7 +32,7 @@ class AssignUserHandle extends Form implements LazyRenderable
->
refresh
();
}
catch
(
\Throwable
$throwable
)
{
// var_dump((string)$throwable);
return
$this
->
response
()
->
error
(
trans
(
'admin.update_failed'
));
return
$this
->
response
()
->
error
(
trans
(
'admin.update_failed'
)
.
":
{
$throwable
->
getMessage
()
}
"
);
}
}
...
...
app/Admin/Forms/User/TransferUserHandle.php
View file @
a581cd18
...
...
@@ -32,7 +32,7 @@ class TransferUserHandle extends Form implements LazyRenderable
->
refresh
();
}
catch
(
\Throwable
$throwable
)
{
// var_dump((string)$throwable);
return
$this
->
response
()
->
error
(
trans
(
'admin.update_failed'
));
return
$this
->
response
()
->
error
(
trans
(
'admin.update_failed'
)
.
":
{
$throwable
->
getMessage
()
}
"
);
}
}
...
...
app/Admin/Service/UserService.php
View file @
a581cd18
...
...
@@ -204,6 +204,13 @@ class UserService
}
//更新客户的数据
$userList
=
User
::
getListByIdArr
(
$ids
);
//判断客户状态
foreach
(
$userList
as
$user
)
{
if
(
$user
[
'status'
]
!=
User
::
STATUS_NORMAL
)
{
throw
new
\Exception
(
"user:[
{
$user
[
'user_sn'
]
}
] status is not normal"
);
}
}
$userIds
=
array_column
(
$userList
,
"id"
);
$update
=
[
"sale_id"
=>
$saleId
,
...
...
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