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
863c6f9b
authored
Mar 02, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
b1453ef9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
app/Console/Commands/SyncSupplierToErp.php
app/Console/Commands/SyncSupplierToErp.php
View file @
863c6f9b
...
...
@@ -33,6 +33,7 @@ class SyncSupplierToErp extends Command
ini_set
(
'memory_limit'
,
-
1
);
set_time_limit
(
0
);
ignore_user_abort
(
true
);
$this
->
info
(
'========================================'
);
$this
->
info
(
'开始同步供应商到ERP'
);
...
...
@@ -50,17 +51,16 @@ class SyncSupplierToErp extends Command
$syncService
=
new
SyncSupplierService
();
$success
=
0
;
$count
=
0
;
$conn
=
new
AMQPStreamConnection
(
config
(
'database.connections.rabbitmq.host'
),
config
(
'database.connections.rabbitmq.port'
),
config
(
'database.connections.rabbitmq.login'
),
config
(
'database.connections.rabbitmq.password'
));
foreach
(
$suppliers
as
$supplier
)
{
$count
++
;
$supplierId
=
$supplier
->
supplier_id
;
echo
"[
{
$count
}
/
{
$total
}
] ID:
{
$supplierId
}
{
$supplier
->
supplier_name
}
... "
;
$result
=
$syncService
->
syncSupplierToErp
(
$supplierId
);
usleep
(
100000
);
$result
=
$syncService
->
syncSupplierToErp
(
$supplierId
,
$conn
);
$success
++
;
echo
"成功
\n
"
;
}
return
0
;
}
}
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