Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
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
78ed6dfa
authored
May 07, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
转移日志
parent
2cb12144
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
app/Http/Controllers/Api/SupplierContactApiController.php
app/Http/Controllers/Api/SupplierContactApiController.php
View file @
78ed6dfa
...
...
@@ -9,6 +9,7 @@ use App\Http\Services\LogService;
use
App\Http\Services\SupplierContactService
;
use
App\Http\Transformers\SupplierContactTransformer
;
use
App\Http\Validators\SupplierContactValidator
;
use
App\Model\IntracodeModel
;
use
App\Model\LogModel
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierContactModel
;
...
...
@@ -213,6 +214,14 @@ class SupplierContactApiController extends Controller
'channel_uid'
=>
implode
(
','
,
$channelUid
),
]);
//打上日志
$contactList
=
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'can_check_uids'
,
$originCanCheckUids
)
->
get
()
->
toArray
();
$originName
=
(
new
AdminUserService
())
->
getAdminUserNameByCodeId
(
$originCanCheckUids
);
$newName
=
(
new
AdminUserService
())
->
getAdminUserNameByCodeId
(
$newCanCheckUids
);
foreach
(
$contactList
as
$contact
)
{
(
new
LogService
())
->
AddLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'转移供应商联系人'
,
"供应商联系人
{
$contact
[
'supplier_consignee'
]
}
由
{
$originName
}
转移到
{
$newName
}
"
);
}
//最后直接去批量修改即可
return
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'can_check_uids'
,
$originCanCheckUids
)
->
update
([
'can_check_uids'
=>
$newCanCheckUids
]);
...
...
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