作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

@@ -143,6 +143,7 @@ class VideoTask extends Command @@ -143,6 +143,7 @@ class VideoTask extends Command
143 ], 143 ],
144 'task_id' => $task_id, 144 'task_id' => $task_id,
145 'callback_url' => env('APP_URL') . '/api/video_task_callback', 145 'callback_url' => env('APP_URL') . '/api/video_task_callback',
  146 + 'is_ytb'=>true
146 ]; 147 ];
147 $result = Http::post('http://216.250.255.116:7866/create_task', $data); 148 $result = Http::post('http://216.250.255.116:7866/create_task', $data);
148 $val->task_id = $task_id; 149 $val->task_id = $task_id;
@@ -231,7 +232,7 @@ class VideoTask extends Command @@ -231,7 +232,7 @@ class VideoTask extends Command
231 $data = []; 232 $data = [];
232 if (!empty($products)){ 233 if (!empty($products)){
233 foreach ($products as $item){ 234 foreach ($products as $item){
234 - $data[] = !empty($item->thumb) && $item->thumb['url'] != "" ? getImageUrl($item->thumb['url']) : ""; 235 + $data[] = ['url'=>!empty($item->thumb) && $item->thumb['url'] != "" ? getImageUrl($item->thumb['url']) : "",'title'=>$item->title];
235 } 236 }
236 } 237 }
237 return $data; 238 return $data;
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :Notice.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2024/3/6 16:01
  8 + */
  9 +
  10 +namespace App\Console\Commands\Notice;
  11 +
  12 +use App\Models\Com\KeywordVideoTaskLog;
  13 +use App\Models\Domain\DomainInfo;
  14 +use Illuminate\Console\Command;
  15 +use Illuminate\Support\Facades\DB;
  16 +
  17 +/**
  18 + * @remark :通知C端生成界面
  19 + * @name :Notice
  20 + * @author :lyh
  21 + * @method :post
  22 + * @time :2024/3/6 16:01
  23 + */
  24 +class Notice extends Command
  25 +{
  26 + /**
  27 + * The name and signature of the console command.
  28 + *
  29 + * @var string
  30 + */
  31 + protected $signature = 'notice_c';
  32 +
  33 + /**
  34 + * The console command description.
  35 + *
  36 + * @var string
  37 + */
  38 + protected $description = '通知C端生成界面';
  39 +
  40 + /**
  41 + * @remark :通知C端生成界面
  42 + * @name :handle
  43 + * @author :lyh
  44 + * @method :post
  45 + * @time :2023/11/20 15:13
  46 + */
  47 + public function handle(){
  48 + $yesterday = date('Y-m-d', strtotime('yesterday'));
  49 + $keywordVideoModel = new KeywordVideoTaskLog();
  50 + $list = $keywordVideoModel->select('project_id')
  51 + ->groupBy('project_id')->whereBetween('date', [$yesterday.' 00:00:00',$yesterday.' 23:59:59'])->get()->toArray();
  52 + dd($list);
  53 + $project_arr = [];
  54 + foreach ($list as $k => $v){
  55 + $project_arr[] = $v['project_id'];
  56 + }
  57 + $domainModel = new DomainInfo();
  58 + $domainList = $domainModel->list(['project_id'=>['in',$project_arr]]);
  59 + //TODO::通知C端
  60 + return true;
  61 + }
  62 +}