Explorar o código

Merge branch 'liuzj-weixin-tishen-dev' into liuzj-fist-page-dev

# Conflicts:
#	modules/Common/Errors/Errors.php
#	modules/Video/Http/Controllers/VideoController.php
liuzejian hai 1 ano
pai
achega
10de4b423d

+ 62 - 0
app/Console/Commands/Video/WechatCheckGetTask.php

@@ -0,0 +1,62 @@
+<?php
+
+namespace App\Console\Commands\Video;
+
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\DB;
+use Modules\Video\Services\WechatCheckSyncService;
+
+class WechatCheckGetTask extends Command
+{
+    /**
+     * The name and signature of the console command.
+     *
+     * @var string
+     */
+    protected $signature = 'Video:WechatCheckGetTask {--task_ids= : 英文逗号分割的任务id}';
+
+    /**
+     * The console command description.
+     *
+     * @var string
+     */
+    protected $description = '查询短剧同步到微信的任务状态';
+
+    /**
+     * Execute the console command.
+     */
+    public function handle(): void
+    {
+        $task_ids = $this->option('task_ids');
+        $taskIdArr = null;
+        if($task_ids) {
+            $taskIdArr = explode(',', trim($task_ids, ','));
+        }
+        DB::table('video_series_wechat_check')
+            ->whereIn('sync_status', [1,2])
+            ->where('sync_task_id', '<>', '')
+            ->where('is_enabled', 1)
+            ->when($taskIdArr, function ($query, $taskIdArr) {
+                return $query->whereIn('task_id', $taskIdArr);
+            })->orderBy('id', 'asc')
+            ->chunk(100, function ($items) {
+                $now = date('Y-m-d H:i:s');
+                foreach ($items as $item) {
+                    $taskInfo = WechatCheckSyncService::getTask($item);
+                    if($taskInfo && 1 == $taskInfo['task_type']) {
+                        if(in_array($taskInfo['status'], [3,4])) {
+                            DB::table('video_series_wechat_check')
+                                ->where(['id' => $item->id])
+                                ->update([
+                                    'status' => $taskInfo['status'],
+                                    'remark' => $taskInfo['errmsg'] ?? '',
+                                    'media_id' => $taskInfo['media_id'] ?? '',
+                                    'updated_at' => $now,
+                                    'sync_task_info' => \json_encode($taskInfo),
+                                ]);
+                        }
+                    }
+                }
+            });
+    }
+}

+ 35 - 0
app/Jobs/Video/WechatCheck.php

@@ -0,0 +1,35 @@
+<?php
+
+namespace App\Jobs\Video;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldBeUnique;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Queue\SerializesModels;
+
+/**
+ * 剧目提审,真实处理逻辑在 duanju_crontab_script 项目
+ */
+class WechatCheck implements ShouldQueue
+{
+    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+
+    private $info;
+    /**
+     * Create a new job instance.
+     */
+    public function __construct($info)
+    {
+        $this->info = $info;
+    }
+
+    /**
+     * Execute the job.
+     */
+    public function handle(): void
+    {
+        //
+    }
+}

+ 11 - 0
app/Libs/Helpers.php

@@ -3,6 +3,7 @@
 
 use Illuminate\Http\UploadedFile;
 use Illuminate\Support\Facades\DB;
+use Modules\Common\Support\Trace\TraceContext;
 use Modules\Common\Support\Upload\Uploader;
 use PhpOffice\PhpSpreadsheet\IOFactory;
 use PhpOffice\PhpSpreadsheet\Spreadsheet;
@@ -404,3 +405,13 @@ if (!function_exists('print_sql')) {
         });
     }
 }
+
+if(!function_exists('getTraceContext')) {
+
+    /**
+     * @return TraceContext
+     */
+    function getTraceContext() {
+        return app(TraceContext::class);
+    }
+}

+ 7 - 1
config/database.php

@@ -145,7 +145,13 @@ return [
             'port' => env('REDIS_PORT', '6379'),
             'database' => env('REDIS_CACHE_DB', '1'),
         ],
-
+        // 普通redis队列
+        'queue-redis' => [
+            'host' => env('COMMON_QUEUE_REDIS_HOST', 'localhost'),
+            'password' => env('COMMON_QUEUE_REDIS_PASSWORD', null),
+            'port' => env('COMMON_QUEUE_REDIS_PORT', 6379),
+            'database' => 2,
+        ],
     ],
 
 ];

+ 7 - 0
config/queue.php

@@ -71,6 +71,13 @@ return [
             'after_commit' => false,
         ],
 
+        'queue-redis' => [
+            'driver' => 'redis',
+            'connection' => 'queue-redis',
+            'queue' => 'default',
+            'expire' => 60,
+        ]
+
     ],
 
     /*

+ 5 - 1
modules/Common/Errors/Errors.php

@@ -10,7 +10,7 @@ class Errors
     public const  PARAM_ERROR= [500004, '参数错误'];
     public const  NO_OPERATE_PERMISSION= [500007, '用户无操作权限'];
     public const  VIDEO_NOT_EXISTS= [500008, '视频不存在'];
-    public const  MINIPROGRAM_STATUS_ERROR= [500005, '小程序未启用'];
+    public const  MINIPROGRAM_STATUS_ERROR= [50005, '小程序未启用'];
     public const  PAY_TEMPLATE_EXISTS_ERROR= [500006, '充值模板已经存在'];
     public const  PAY_TEMPLATE_GIVEN_TOO_MUCH= [500007, '赠送不能超过金额3倍'];
     public const  PAY_TEMPLATE_NOT_EXISTS_ERROR= [500008, '充值模板不存在'];
@@ -28,4 +28,8 @@ class Errors
     public const  TIXIAN_RECORD_NOT_EXISTS = [500203, '提现记录不存在'];
     public const  TIXIAN_ONLY_ONCE_EVERY_DAY = [500204, '每天只能提现一次'];
     public const  OPERATION_FIRST_PAGE_LIST_NOT_EXISTS = [500301, '首页列表配置项不存在'];
+    public const  VIDEO_SERIES_NOT_EXISTS = [500302, '剧集不存在'];
+    public const REQUEST_HTTP_STATUS_ERROR = [500401, '请求上游接口返回http状态码有误'];
+    public const REQUEST_CODE_STATUS_ERROR = [500402, '请求上游接口返回code状态码有误'];
+    public const SYNC_WECHAT_NOT_OK = [500302, '剧集没有成功同步到微信'];
 }

+ 31 - 0
modules/Manage/Services/WechatMiniprogramService.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace Modules\Manage\Services;
+
+use Illuminate\Support\Facades\Redis;
+
+class WechatMiniprogramService
+{
+    /**
+     * 微信短剧提审appid
+     * @return string
+     */
+    public static function getDuanjuCheckAppid() {
+        return config('manage.miniprogram.duanjuWechatCheck.appid');
+    }
+
+    /**
+     * 微信短剧提审小程序 accessToken
+     * @param string|null $appid
+     * @return string
+     */
+    public static function getDuanjuCheckAccessToken($appid=null) {
+        $checkAppid = $appid ?: self::getDuanjuCheckAppid();
+
+        return Redis::get(self::getAccessTokenRedisKey($checkAppid));
+    }
+
+    private static function getAccessTokenRedisKey($appid) {
+        return 'dj.miniWechat.at.' . $appid;
+    }
+}

+ 7 - 2
modules/Manage/config/miniprogram.php

@@ -4,9 +4,14 @@
  * 小程序配置
  */
 return [
-    
+
     'typelist'=>[
         'WEIXIN','BYTECODE'
     ],
-    
+    /**
+     * 微信短剧提审小程序
+     */
+    'duanjuWechatCheck' => [
+        'appid' => env('MINIPROGRAM_DUANJU_WECHATCHEECK_APPID', 'wx86822355ccd03a78')
+    ]
 ];

+ 10 - 3
modules/Video/Http/Controllers/VideoController.php

@@ -28,6 +28,7 @@ class VideoController extends CatchController
         $categoryId = $request->input('categoryId');
         $videoId = $request->input('videoId');
         $shelfType = $request->input('shelfType');
+        $wechatPass = $request->input('wechatPass');
 
         $videos = DB::table('videos')
             ->when($videoId, function ($query, $videoId){
@@ -41,7 +42,10 @@ class VideoController extends CatchController
                 return $query->where('update_type', $updateType);
             })->when($categoryId, function ($query, $categoryId){
                 return $query->where('category_id', $categoryId);
-            })->orderBy('id', 'desc')
+            })->when(!is_null($wechatPass), function ($query) use ($wechatPass) {
+                return $query->where('wechat_pass', $wechatPass);
+            })
+            ->orderBy('id', 'desc')
             ->paginate($request->integer('limit', 15));
         $userContext = $this->getUserContext($request->input('operateUserId'));
         $allVideoCategory =  DB::table('video_category')
@@ -53,6 +57,7 @@ class VideoController extends CatchController
             $video->update_type_str = $video->update_type == 1 ? '连载中' : '完结';
             $video->cp_share_type_str = ([1 => '分成', 2=>'保底', 3=>'买断'])[$video->cp_share_type] ?? '';
             $video->channel = $allVideoCategory->get($video->category_id)->pid;
+            $video->wechat_pass_img = $video->wechat_pass ? config('common.common.logos.1') : '';
         }
 
         return $videos;
@@ -122,7 +127,8 @@ class VideoController extends CatchController
             'd_charge_coin' => 'required|integer|min:1',
             'cp_name' => 'required|string',
             'cp_share_type' => 'required|integer|in:1,2,3',
-            'cover_image' => 'required|string'
+            'cover_image' => 'required|string',
+            'note' => 'required',
         ]);
         $data = $request->all();
         $now = date('Y-m-d H:i:s');
@@ -155,7 +161,8 @@ class VideoController extends CatchController
             'd_charge_coin' => 'required|integer|min:1',
             'cp_name' => 'required|string',
             'cp_share_type' => 'required|integer|in:1,2,3',
-            'cover_image' => 'required|string'
+            'cover_image' => 'required|string',
+            'note' => 'required',
         ]);
         $id = $request->input('id');
         $data = $request->except('id', 'shelf_at');

+ 80 - 0
modules/Video/Http/Controllers/VideoSeriesWechatCheckController.php

@@ -0,0 +1,80 @@
+<?php
+
+namespace Modules\Video\Http\Controllers;
+
+use Catch\Base\CatchController;
+use Illuminate\Foundation\Validation\ValidatesRequests;
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Redis;
+use Modules\Common\Errors\Errors;
+use Modules\Common\Exceptions\CommonBusinessException;
+use Modules\Manage\Services\WechatMiniprogramService;
+use Modules\Video\Services\WechatCheckSyncService;
+
+class VideoSeriesWechatCheckController extends CatchController
+{
+    use ValidatesRequests;
+    /**
+     * 剧集同步到微信
+     * @param Request $request
+     */
+    public function syncWechat(Request $request) {
+        $this->validate($request, [
+            'series_ids' => 'required|array'
+        ]);
+        $series_ids = $request->input('series_ids');
+        $series = DB::table('video_series')
+            ->join('videos', 'video_series.video_id', 'videos.id')
+            ->whereIn('video_series.id', $series_ids)
+            ->where(['video_series.is_enabled' => 1])
+            ->select('videos.name', 'video_series.series_sequence','video_series.id', 'video_series.video_key')
+            ->get();
+        if(collect($series_ids)->count() != $series->count()) {
+            CommonBusinessException::throwError(Errors::VIDEO_SERIES_NOT_EXISTS);
+        }
+        $appid = WechatMiniprogramService::getDuanjuCheckAppid();
+        $accessToken = WechatMiniprogramService::getDuanjuCheckAccessToken($appid);
+        $now = date('Y-m-d H:i:s');
+        foreach ($series as $item) {
+            $item->video_url = config('common.qiniu.publicVideoLinkDomain') . DIRECTORY_SEPARATOR . $item->video_key;
+            $item->media_name = sprintf('%s - 第%s集', $item->name, $item->series_sequence);
+            $taskId = WechatCheckSyncService::pullupload($item, $accessToken);
+            DB::table('video_series_wechat_check')
+                ->where(['series_id' => $item->id, 'is_enabled' => 1])
+                ->update(['is_enabled' => 0, 'updated_at' => $now]);
+            DB::table('video_series_wechat_check')
+                ->insert([
+                    'series_id' => $item->id,
+                    'sync_task_id' => $taskId, 'appid' => $appid,
+                    'created_at' => $now, 'updated_at' => $now
+                ]);
+        }
+
+        return 'ok';
+    }
+
+    /**
+     * 获取微信那边的剧集播放链接
+     * @param Request $request
+     * @return mixed
+     * @throws \Illuminate\Validation\ValidationException
+     */
+    public function medialink(Request $request) {
+        $this->validate($request, [
+            'series_id' => 'required'
+        ]);
+
+        $seriesId = $request->input('series_id');
+        $redisKey = WechatCheckSyncService::getWechatMediaLinkRedisKey($seriesId);
+        $link = Redis::get($redisKey);
+        if($link) {
+            return $link;
+        }
+
+        $medialinkInfo = WechatCheckSyncService::getMedialinkInfo($seriesId);
+        $link = $medialinkInfo['mp4_url'];
+        Redis::setex($redisKey, 6000, $link);
+        return $link;
+    }
+}

+ 119 - 0
modules/Video/Http/Controllers/WechatCheckController.php

@@ -0,0 +1,119 @@
+<?php
+
+namespace Modules\Video\Http\Controllers;
+
+use App\Jobs\Video\WechatCheck;
+use Catch\Base\CatchController;
+use Illuminate\Foundation\Validation\ValidatesRequests;
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
+
+/**
+ * 微信提审
+ */
+class WechatCheckController extends CatchController
+{
+    use ValidatesRequests;
+    /**
+     * 添加提审
+     * @param Request $request
+     */
+    public function add(Request $request) {
+        $this->validate($request, [
+            'video_id'=>'required',
+            'producer' => 'required|string|max:256',
+            'playwright' => 'required|string|max:256',
+            'production_license_img' => 'required|url',
+            'authorized_img' => 'required|url'
+        ]);
+
+        $data = $request->all();
+        $data['created_at'] = $data['updated_at'] = date('Y-m-d H:i:s');
+        DB::table('video_wechat_check')
+            ->insert($data);
+
+        return 'ok';
+    }
+
+    /**
+     * 修改
+     * @param Request $request
+     */
+    public function update(Request $request) {}
+
+    /**
+     * 删除
+     * @param Request $request
+     */
+    public function delete(Request $request) {
+        $this->validate($request, ['id' => 'required']);
+        DB::table('video_wechat_check')
+            ->where([
+                'id' => $request->input('id'),
+                'is_enabled' => 1,
+            ])->update([
+                'is_enabled' => 0,
+                'updated_at' => date('Y-m-d H:i:s')
+            ]);
+
+        return 'ok';
+    }
+    /**
+     * 提审记录列表
+     * @param Request $request
+     */
+    public function list(Request $request) {
+        $videoId = $request->input('video_id');
+        $producer = $request->input('producer');
+        $playwright = $request->input('playwright');
+        $status = $request->input('status',0);
+
+        return DB::table('video_wechat_check as check')
+            ->join('videos', 'videos.id', 'check.video_id')
+            ->where([
+                'check.status' => $status,
+                'check.is_enabled' => 1,
+            ])->when($videoId, function ($query, $videoId) {
+                return $query->where('check.video_id', $videoId);
+            })->when($producer, function ($query, $producer){
+                return $query->where('check.producer', 'like', '%'. $producer. '%');
+            })->when($playwright, function ($query, $playwright){
+                return $query->where('check.playwright', 'like', '%'. $playwright. '%');
+            })->select('check.id', 'videos.name', 'videos.note', 'videos.total_episode_num',
+                'videos.cover_image','check.status','check.producer',
+            'check.playwright', 'check.production_license_img', 'check.authorized_img', 'check.apply_at',
+            'check.check_at', 'check.check_reason')
+            ->orderBy('check.id','desc')
+            ->paginate($request->input('limit', 10));
+
+    }
+
+    /**
+     * 微信提审
+     * @param Request $request
+     */
+    public function wechatCheck(Request $request) {
+        $this->validate($request, [
+            'ids' => 'required|array'
+        ]);
+        $ids = $request->input('ids');
+        $now = date('Y-m-d H:i:s');
+        DB::table('video_wechat_check')
+            ->whereIn('id', $ids)
+            ->whereIn('status', [0, 4])
+            ->update([
+                'status' => 5,
+                'updated_at' => $now,
+                'apply_at' => $now,
+            ]);
+        $traceContext = getTraceContext();
+        foreach ($ids as  $id) {
+            WechatCheck::dispatch([
+                'id' => $id,
+                'traceInfo' => $traceContext->getTraceInfo()
+            ])->onQueue('{duanju_manage}.video.wechatCheck')->onConnection('queue-redis');
+        }
+
+        return 'ok';
+    }
+}

+ 103 - 0
modules/Video/Services/WechatCheckSyncService.php

@@ -0,0 +1,103 @@
+<?php
+
+namespace Modules\Video\Services;
+
+use GuzzleHttp\Client;
+use Illuminate\Support\Facades\DB;
+use Modules\Common\Errors\Errors;
+use Modules\Common\Exceptions\CommonBusinessException;
+use Modules\Manage\Services\WechatMiniprogramService;
+
+
+class WechatCheckSyncService
+{
+    /**
+     * 拉取上传
+     * @param $item 剧集信息
+     * @param $accessToken 小程序accessToken
+     * @return  string task_id
+     * @throws \GuzzleHttp\Exception\GuzzleException
+     */
+    public static function pullupload($item, $accessToken) {
+        $url = 'https://api.weixin.qq.com/wxa/sec/vod/pullupload?access_token='.$accessToken;
+        $parsedContent = self::postWechat($url, [
+            'media_name' => $item->media_name,
+            'media_url' => $item->video_url
+        ]);
+        return $parsedContent['task_id'];
+    }
+
+    /**
+     * 获取微信短剧剧集的播放链接信息
+     * @param $seriesId
+     * @return mixed
+     * @throws \GuzzleHttp\Exception\GuzzleException
+     */
+    public static function getMedialinkInfo($seriesId) {
+        $syncInfo = DB::table('video_series_wechat_check')
+            ->where([
+                'series_id'=> $seriesId,
+                'sync_status' => 3,
+                'is_enabled' => 1,
+            ])->first();
+
+        if(!$syncInfo || !$syncInfo->media_id) {
+            CommonBusinessException::throwError(Errors::SYNC_WECHAT_NOT_OK);
+        }
+        $mediaId = $syncInfo->media_id;
+        $accessToken = WechatMiniprogramService::getDuanjuCheckAccessToken($syncInfo->appid);
+        $url = 'https://api.weixin.qq.com/wxa/sec/vod/getmedialink?access_token='.$accessToken;
+
+        $parsedContent = self::postWechat($url, [
+            'media_id' => $mediaId,
+            't' => time() + 7200,
+        ]);
+        return $parsedContent['media_info'];
+    }
+
+    public static function getWechatMediaLinkRedisKey($seriesId) {
+        return 'wechat.medialink.'.$seriesId;
+    }
+
+    public static function getTask($syncInfo) {
+        try {
+            $accessToken = WechatMiniprogramService::getDuanjuCheckAccessToken($syncInfo->appid);
+            $url = 'https://api.weixin.qq.com/wxa/sec/vod/gettask?access_token='.$accessToken;
+            $parsedContent = self::postWechat($url, [
+                'task_id' => $syncInfo->sync_task_id
+            ]);
+            return $parsedContent['task_info'];
+        } catch (\Exception $exception) {
+            return [];
+        }
+
+    }
+
+    /**
+     *  post 请求微信上游
+     * @param $url
+     * @param $data
+     * @throws \GuzzleHttp\Exception\GuzzleException
+     */
+    public static function postWechat($url, $data) {
+        $client = new Client(['timeout' => 3]);
+        $httpResult = $client->post($url, $data);
+
+        $httpStatus = $httpResult->getStatusCode();
+        if(200 != $httpStatus) {
+            CommonBusinessException::throwError(Errors::REQUEST_HTTP_STATUS_ERROR);
+        }
+        $httpContent = $httpResult->getBody()->getContents();
+        $parsedContent = \json_decode($httpContent, true);
+        if(0 != ($parsedContent['errcode'] ?? 0)) {
+            myLog('WechatCheckSync')->error('请求微信异常', [
+                'url' => $url,
+                'data' => $data,
+                'errMsg' => $httpContent
+            ]);
+            CommonBusinessException::throwError(Errors::REQUEST_CODE_STATUS_ERROR);
+        }
+
+        return $parsedContent;
+    }
+}

+ 12 - 0
modules/Video/routes/route.php

@@ -4,6 +4,8 @@ use Illuminate\Support\Facades\Route;
 use Modules\Video\Http\Controllers\EpisodeController;
 use Modules\Video\Http\Controllers\VideoCategoryController;
 use Modules\Video\Http\Controllers\VideoController;
+use Modules\Video\Http\Controllers\VideoSeriesWechatCheckController;
+use Modules\Video\Http\Controllers\WechatCheckController;
 
 Route::prefix('videoStock')->group(function () {
     Route::get('video/list', [VideoController::class, 'list']);
@@ -16,5 +18,15 @@ Route::prefix('videoStock')->group(function () {
     Route::post('video/add', [VideoController::class, 'add']);
     Route::post('video/setChargeConfig', [VideoController::class, 'setChargeConfig']);
     Route::post('episode/add', [EpisodeController::class, 'add']);
+
+    Route::prefix('wechatCheck')->group(function(){
+        Route::post('add', [WechatCheckController::class, 'add']);
+        Route::get('list', [WechatCheckController::class, 'list']);
+        Route::post('delete', [WechatCheckController::class, 'delete']);
+        Route::prefix('videoSeries')->group(function(){
+            Route::post('syncWechat', [VideoSeriesWechatCheckController::class, 'syncWechat']);
+        });
+    });
+
 });
 

+ 2 - 1
tests/Video/Http/Controllers/VideoControllerTest.php

@@ -62,7 +62,8 @@ class VideoControllerTest extends UsedTestCase
 //            'videoName' => '112',
 //        'updateType' => 2,
 //        'categoryId' => 4,
-            'operateUserId' =>10
+//            'operateUserId' =>10
+            'wechatPass' => ''
         ]);
 //        $this->dumpJson($res);
         $res->dump();

+ 22 - 0
tests/Video/Http/Controllers/VideoSeriesWechatCheckControllerTest.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace Tests\Video\Http\Controllers;
+
+use Modules\Video\Http\Controllers\VideoSeriesWechatCheckController;
+use PHPUnit\Framework\TestCase;
+use Tests\UsedTestCase;
+
+class VideoSeriesWechatCheckControllerTest extends UsedTestCase
+{
+
+    public function testSyncWechat()
+    {
+        $res = $this->withHeaders([
+            'Authorization' => 'Bearer '. $this->token,
+        ])->json('post','http://localhost/api/videoStock/wechatCheck/videoSeries/syncWechat', [
+            'series_ids' => [81,82,83,84,85],
+        ]);
+        $res->dump();
+        $this->dumpJson($res);
+    }
+}

+ 37 - 0
tests/Video/Http/Controllers/WechatCheckControllerTest.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace Tests\Video\Http\Controllers;
+
+use Modules\Video\Http\Controllers\WechatCheckController;
+use PHPUnit\Framework\TestCase;
+use Tests\UsedTestCase;
+
+class WechatCheckControllerTest extends UsedTestCase
+{
+
+    public function testAdd()
+    {
+        $res = $this->withHeaders([
+            'Authorization' => 'Bearer '. $this->token,
+        ])->json('post','http://localhost/api/videoStock/wechatCheck/add', [
+            'video_id' => 12,
+            'producer' => 'zzz',
+            'playwright' =>  'xxxx',
+            'production_license_img' => 'https://minifile-cdn.zvyhjkx.com/uploads/images/20230531/9NUcrj2Dfz1685513143.png',
+            'authorized_img' => 'https://minifile-cdn.zvyhjkx.com/uploads/images/20230531/9NUcrj2Dfz1685513143.png'
+        ]);
+        $res->dump();
+    }
+
+    public function testList()
+    {
+        $res = $this->withHeaders([
+            'Authorization' => 'Bearer '. $this->token,
+        ])->json('get','http://localhost/api/videoStock/wechatCheck/list', [
+            'video_id' => 12,
+            'producer' => 'zzz',
+            'playwright' =>  'xxxx',
+        ]);
+        $res->dump();
+    }
+}