|
...
|
...
|
@@ -25,7 +25,7 @@ class AiVideoController extends BaseController |
|
|
|
* @time :2025/8/2 11:19
|
|
|
|
*/
|
|
|
|
public function ImageCallBack(){
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($this->param, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->saveLog('数据详情:'.json_encode($this->param,true));
|
|
|
|
Log::channel('ai_video')->info('数据详情:'.json_encode($this->param,true));
|
|
|
|
$count = Redis::decr('ai_video_image');
|
|
|
|
if ($count < 0) {
|
|
...
|
...
|
@@ -39,11 +39,13 @@ class AiVideoController extends BaseController |
|
|
|
//获取当前数据详情
|
|
|
|
$info = $aiVideoAutoLogModel->read(['trigger_id'=>$this->param['id']]);
|
|
|
|
if($info === false){
|
|
|
|
@file_put_contents(storage_path('logs/ai_video.log'), var_export($info, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
Log::channel('ai_video')->info('当前数据不存在或已被删除'.$this->param['id']);
|
|
|
|
}
|
|
|
|
//上传图片 返回cdn链接
|
|
|
|
$cosService = new CosService();
|
|
|
|
$imagePath = $cosService->uploadRemote($info['project_id'],'video',$data['url']);
|
|
|
|
@file_put_contents(storage_path('logs/ai_video.log'), var_export($imagePath, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
try {
|
|
|
|
if($imagePath){
|
|
|
|
$cos = config('filesystems.disks.cos');
|
|
...
|
...
|
@@ -66,4 +68,16 @@ class AiVideoController extends BaseController |
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存日志
|
|
|
|
* @name :saveLog
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/8/4 11:54
|
|
|
|
*/
|
|
|
|
public function saveLog($message){
|
|
|
|
@file_put_contents(storage_path('logs/ai_video.log'), var_export($message, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|