作者 lyh

gx ai视频

@@ -86,6 +86,25 @@ class AiBlogController extends BaseController @@ -86,6 +86,25 @@ class AiBlogController extends BaseController
86 } 86 }
87 87
88 /** 88 /**
  89 + * @remark :
  90 + * @name :saveText
  91 + * @author :lyh
  92 + * @method :post
  93 + * @time :2025/4/30 18:05
  94 + */
  95 + public function saveText(AiBlogLogic $aiBlogLogic){
  96 + $this->request->validate([
  97 + 'id'=>['required'],
  98 + 'text'=>['required'],
  99 + ],[
  100 + 'id.required' => '关键字不能为空',
  101 + 'text.required' => '场景不能为空',
  102 + ]);
  103 + $aiBlogLogic->blogSaveText();
  104 + $this->response('success');
  105 + }
  106 +
  107 + /**
89 * @remark :获取作者列表 108 * @remark :获取作者列表
90 * @name :getAiBlogAuthor 109 * @name :getAiBlogAuthor
91 * @author :lyh 110 * @author :lyh
@@ -63,14 +63,12 @@ class AiBlogLogic extends BaseLogic @@ -63,14 +63,12 @@ class AiBlogLogic extends BaseLogic
63 $aiBlogService->mch_id = $aiSettingInfo['mch_id']; 63 $aiBlogService->mch_id = $aiSettingInfo['mch_id'];
64 $aiBlogService->key = $aiSettingInfo['key']; 64 $aiBlogService->key = $aiSettingInfo['key'];
65 $aiBlogService->updateDetail(['task_id'=>$this->param['task_id'],'title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$this->param['author_id']]); 65 $aiBlogService->updateDetail(['task_id'=>$this->param['task_id'],'title'=>$this->param['new_title'],'thumb'=>$this->param['image'],'route'=>$this->param['route'],'author_id'=>$this->param['author_id']]);
66 - $aiBlogTaskModel = new AiBlogTask();  
67 - $aiBlogTaskModel->edit(['status'=>AiBlogTask::STATUS_RUNNING],['task_id'=>$this->param['task_id']]);//重新走拉取流程  
68 }catch (\Exception $e){ 66 }catch (\Exception $e){
69 $this->fail('保存失败,请联系管理员'); 67 $this->fail('保存失败,请联系管理员');
70 } 68 }
71 return $this->success(); 69 return $this->success();
72 } 70 }
73 - 71 +
74 /** 72 /**
75 * @remark :编辑作者 73 * @remark :编辑作者
76 * @name :saveAuthor 74 * @name :saveAuthor