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
426ecd82
authored
Nov 17, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改询价用户
parent
a43c015d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
app/Admin/Service/InquiryService.php
app/Models/Inquiry.php
app/Admin/Service/InquiryService.php
0 → 100644
View file @
426ecd82
<?php
namespace
App\Admin\Service
;
use
App\Admin\Actions\User\UserAssignAction
;
use
App\Admin\Actions\User\UserStatusAction
;
use
App\Admin\Actions\User\UserTransferAction
;
use
App\Models\Inquiry
;
use
App\Models\User
;
use
Dcat\Admin\Grid
;
class
InquiryService
{
public
static
function
batchUpdateSalesId
(
$salesId
,
$userIds
=
[])
{
return
Inquiry
::
batchUpdateSalesId
(
$salesId
,
$userIds
);
}
}
app/Models/Inquiry.php
View file @
426ecd82
...
...
@@ -32,4 +32,13 @@ class Inquiry extends Model
return
$this
->
hasOne
(
CmsUser
::
class
,
'userId'
,
'sales_id'
);
}
public
static
function
batchUpdateSalesId
(
$salesId
,
$userIds
=
[])
{
return
self
::
whereIn
(
'user_id'
,
$userIds
)
->
where
(
'status'
,
self
::
STATUS_PENDING
)
->
update
([
'sales_id'
=>
$salesId
,
'update_time'
=>
time
(),
]);
}
}
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