Commit 5ba70637 authored by hangjun83's avatar hangjun83

openapi 震坤行

parent a5731c6b
......@@ -6,6 +6,8 @@ namespace App\Services;
use App\Repositories\Contracts\ThirdApiPlatformRepository;
use App\Services\Kafka\KafkaService;
use App\Services\ThirdPlatform\Api\IntegleApiService;
use App\Support\Facades\SimpleKafka;
use App\Support\Facades\SimpleLogs;
class InteglePlatformService
{
......@@ -23,7 +25,7 @@ class InteglePlatformService
$status = $this->apiService->checkPlatformStatus();
if($status){
$rhawnChemicalsService = app(RhawnChemicalsService::class);
$limit = $this->platformInfo['platform_params']['batchNums'];
$limit = $this->apiService->getPlatformInfo('platform_params')['batchNums'];
$page = 0;
while(true) {
......@@ -43,7 +45,7 @@ class InteglePlatformService
}
}
if(!empty($rawList)){
app(KafkaService::class)->produerSend(
SimpleKafka::produerSend(
[
'params' => ['rawList' => $rawList,'packageList' => $newPackages],
'consumer' => 'App\Services\InteglePlatformService',
......@@ -61,7 +63,7 @@ class InteglePlatformService
$result = $this->apiService->pushBatchUpdateProduct($updateData);
if($result){
if($result['status'] === false){
app(KafkaService::class)->produerSend(
SimpleKafka::produerSend(
[
'consumer' => 'App\Services\InteglePlatformService',
'method' => 'batchUpdateApi',
......@@ -76,6 +78,6 @@ class InteglePlatformService
'apiParams' => $updateData,
'apiReturn' => $result
];
app(SysLogService::class)->addApiLogs($logsContent);
SimpleLogs::writeLog($logsContent,__CLASS__.':batchUpdateApi');
}
}
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 to comment