Commit 1cd2513c by 杨树贤

添加日志

parent a3f73892
...@@ -132,6 +132,7 @@ class SyncSupplierService ...@@ -132,6 +132,7 @@ class SyncSupplierService
} }
$channel = $conn->channel(); $channel = $conn->channel();
$channel->queue_declare('supplier_sync', false, true, false, false); $channel->queue_declare('supplier_sync', false, true, false, false);
Log::warning(json_encode($message));
$msg = new AMQPMessage(json_encode($message), $msg = new AMQPMessage(json_encode($message),
array('content_type' => 'text/plain')); array('content_type' => 'text/plain'));
$result = $channel->basic_publish($msg, '', 'supplier_sync'); $result = $channel->basic_publish($msg, '', 'supplier_sync');
......
...@@ -84,5 +84,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -84,5 +84,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
\App\Http\Services\DataService::getSpuAttrs(); (new \App\Http\Services\SyncSupplierService())->syncSupplierToErp(2335);
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment