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
02ecc79b
authored
Mar 23, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
同步脚本
parent
afb07e61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
app/Console/Commands/SyncAllSupplierToErp.php
app/Console/Commands/SyncAllSupplierToErp.php
View file @
02ecc79b
...
@@ -7,6 +7,7 @@ use App\Http\Services\StatisticsSkuUploadService;
...
@@ -7,6 +7,7 @@ use App\Http\Services\StatisticsSkuUploadService;
use
App\Http\Services\SupplierService
;
use
App\Http\Services\SupplierService
;
use
App\Http\Services\SyncSupplierService
;
use
App\Http\Services\SyncSupplierService
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierContactModel
;
use
Illuminate\Console\Command
;
use
Illuminate\Console\Command
;
use
Illuminate\Foundation\Inspiring
;
use
Illuminate\Foundation\Inspiring
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
...
@@ -43,6 +44,11 @@ class SyncAllSupplierToErp extends Command
...
@@ -43,6 +44,11 @@ class SyncAllSupplierToErp extends Command
config
(
'database.connections.rabbitmq.login'
),
config
(
'database.connections.rabbitmq.login'
),
config
(
'database.connections.rabbitmq.password'
));
config
(
'database.connections.rabbitmq.password'
));
foreach
(
$supplierIds
as
$supplierId
)
{
foreach
(
$supplierIds
as
$supplierId
)
{
$hasDataFollower
=
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'channel_user_type'
,
SupplierContactModel
::
CHANNEL_USER_TYPE_INVENTORY
)
->
exists
();
if
(
!
$hasDataFollower
)
{
continue
;
}
usleep
(
100000
);
usleep
(
100000
);
dump
(
$supplierId
);
dump
(
$supplierId
);
(
new
SyncSupplierService
())
->
syncSupplierToErp
(
$supplierId
,
$conn
);
(
new
SyncSupplierService
())
->
syncSupplierToErp
(
$supplierId
,
$conn
);
...
...
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