作者 lyh

gx创建作者

@@ -65,49 +65,4 @@ class AiBlogListTask extends Command @@ -65,49 +65,4 @@ class AiBlogListTask extends Command
65 } 65 }
66 return true; 66 return true;
67 } 67 }
68 -  
69 -  
70 - /**  
71 - * @remark :获取项目配置  
72 - * @name :getSetting  
73 - * @author :lyh  
74 - * @method :post  
75 - * @time :2025/2/14 11:27  
76 - */  
77 - public function getSetting($project_id){  
78 - $ai_cache = Cache::get('ai_blog_'.$project_id);  
79 - if($ai_cache){  
80 - return $ai_cache;  
81 - }  
82 - $projectAiSettingModel = new ProjectAiSetting();  
83 - $aiSettingInfo = $projectAiSettingModel->read(['project_id'=>$project_id]);  
84 - Cache::put('ai_blog_'.$project_id,$aiSettingInfo,3600);  
85 - return $aiSettingInfo;  
86 - }  
87 -  
88 - /**  
89 - * @remark :更新作者的页面  
90 - * @name :updateAiBlogAuthor  
91 - * @author :lyh  
92 - * @method :post  
93 - * @time :2025/2/21 11:53  
94 - */  
95 - public function updateAiBlogAuthor($aiSettingInfo,$author_id){  
96 - if(empty($author_id)){  
97 - return true;  
98 - }  
99 - $aiBlogService = new AiBlogService();  
100 - $aiBlogService->mch_id = $aiSettingInfo['mch_id'];  
101 - $aiBlogService->key = $aiSettingInfo['key'];  
102 - $aiBlogService->author_id = $author_id;  
103 - $result = $aiBlogService->getAuthorDetail();  
104 - if(isset($result['status']) && $result['status'] == 200){  
105 - //当前作者的页面  
106 - $aiBlogAuthorModel = new AiBlogAuthor();  
107 - if(!empty($result['data']['section'])){  
108 - $aiBlogAuthorModel->edit(['text'=>$result['data']['section']],['author_id'=>$author_id]);  
109 - }  
110 - }  
111 - return true;  
112 - }  
113 } 68 }