Commit 5ba70637 authored by hangjun83's avatar hangjun83

openapi 震坤行

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