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
2ef15e40
authored
Mar 02, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
8b22f616
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
app/Http/Services/SupplierService.php
app/Http/Services/SupplierService.php
View file @
2ef15e40
...
@@ -1320,7 +1320,7 @@ class SupplierService
...
@@ -1320,7 +1320,7 @@ class SupplierService
$suppliers
=
$query
->
get
();
$suppliers
=
$query
->
get
();
\dump
(
"一共处理供应商 : "
.
count
(
$suppliers
->
toArray
()));
// 记录总数但不使用dump避免输出问题
$result
=
[
$result
=
[
'mode'
=>
$isProdMode
?
'production'
:
'debug'
,
'mode'
=>
$isProdMode
?
'production'
:
'debug'
,
...
@@ -1333,6 +1333,12 @@ class SupplierService
...
@@ -1333,6 +1333,12 @@ class SupplierService
];
];
foreach
(
$suppliers
as
$supplier
)
{
foreach
(
$suppliers
as
$supplier
)
{
try
{
// 数据库重连,防止长时间运行断开
if
(
$result
[
'total'
]
>
0
&&
$result
[
'total'
]
%
100
==
0
)
{
\DB
::
reconnect
(
'web'
);
}
$result
[
'total'
]
++
;
$result
[
'total'
]
++
;
$supplierId
=
$supplier
->
supplier_id
;
$supplierId
=
$supplier
->
supplier_id
;
$yunxinChannelUid
=
$supplier
->
yunxin_channel_uid
;
$yunxinChannelUid
=
$supplier
->
yunxin_channel_uid
;
...
@@ -1418,6 +1424,15 @@ class SupplierService
...
@@ -1418,6 +1424,15 @@ class SupplierService
]);
]);
}
}
}
}
}
catch
(
\Exception
$e
)
{
$result
[
'failed'
]
++
;
$result
[
'debug_info'
][]
=
[
'supplier_id'
=>
isset
(
$supplierId
)
?
$supplierId
:
0
,
'supplier_code'
=>
isset
(
$supplier
->
supplier_code
)
?
$supplier
->
supplier_code
:
''
,
'supplier_name'
=>
isset
(
$supplier
->
supplier_name
)
?
$supplier
->
supplier_name
:
''
,
'fail_reason'
=>
'异常: '
.
$e
->
getMessage
(),
];
}
}
}
return
$result
;
return
$result
;
...
...
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