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
6c0ba1c3
authored
Jan 04, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
123ef8b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
6c0ba1c3
...
...
@@ -1651,13 +1651,35 @@ class DataService
\dump
(
"供应商
{
$value
}
没有找到跟单员"
);
continue
;
}
$contact
=
$contact
->
toArray
();
$contact
[
'can_check_uids'
]
=
10326
;
$contact
[
'channel_user_type'
]
=
1
;
unset
(
$contact
[
'contact_id'
]);
\dump
(
$contact
);
//判断是否存在
if
(
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'can_check_uids'
,
10326
)
->
where
(
'channel_user_type'
,
1
)
->
exists
())
{
\dump
(
"已经存在 : "
.
$supplierId
);
continue
;
}
if
(
$updateData
)
{
SupplierContactModel
::
insert
(
$contact
);
$allChannelUids
=
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
pluck
(
'can_check_uids'
)
->
toArray
();
$allChannelUids
=
array_unique
(
$allChannelUids
);
$allChannelUids
=
array_filter
(
$allChannelUids
,
function
(
$value
)
{
return
!
empty
(
$value
);
});
\dump
(
'供应商 :'
.
$supplierId
.
' 最后更新的供应商采购员列表为 : '
.
\implode
(
','
,
$allChannelUids
));
if
(
$updateData
)
{
if
(
$allChannelUids
)
{
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'channel_uid'
=>
\implode
(
','
,
$allChannelUids
),
]);
}
}
}
\dump
(
"供应商
{
$value
}
新增跟单员记录"
);
}
}
...
...
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