Commit 06cef9c6 authored by hangjun83's avatar hangjun83

优化

parent e70f9514
......@@ -12,6 +12,7 @@
namespace App\Http\Controllers\Middleware;
use App\Services\CustomerService;
use App\Services\ThirdPlatform\ThirdPlatformService;
use App\Services\ThirdPlatform\ZhenKhService;
use Closure;
use Illuminate\Auth\Access\AuthorizationException;
......@@ -70,6 +71,8 @@ class Authenticate
$params = $request->all();
// 内部平台调用
if(isset($params['platform']) && !empty($params['platform'])){
$platform = app(ThirdPlatformService::class)->checkPlatformToken($params['platform']);
var_dump($platform);
switch($params['platform']){
case 'zkh' : $platformToken = app(ZhenKhService::class)->apiService->getPlatformInfo('platform_token');break;
}
......
<?php
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <longjian.huang@foxmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace App\Services\ThirdPlatform;
use App\Jobs\queue\QueueJob;
use App\Repositories\Contracts\ThirdApiPlatformRepository;
use App\Services\Kafka\KafkaService;
use App\Services\PlatformDataEntriesService;
use App\Support\Facades\SimpleKafka;
class ThirdPlatformService extends PlatformAbstractService
{
public function __construct(ThirdApiPlatformRepository $thirdApiPlatformRepository)
{
parent::__construct($thirdApiPlatformRepository);
}
public function checkPlatformToken($platformName)
{
$this->setPlatformName($platformName);
$platformInfo = $this->getPlatformInfo('platform_token');
var_dump($platformInfo);
exit;
}
}
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