正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
| @@ -185,15 +185,19 @@ class AiBlogLogic extends BaseLogic | @@ -185,15 +185,19 @@ class AiBlogLogic extends BaseLogic | ||
| 185 | if(isset($param['id']) && !empty($param['id'])){ | 185 | if(isset($param['id']) && !empty($param['id'])){ |
| 186 | $data['task_id'] = $param['task_id']; | 186 | $data['task_id'] = $param['task_id']; |
| 187 | $this->model->edit($param,['id'=>$param['id']]); | 187 | $this->model->edit($param,['id'=>$param['id']]); |
| 188 | + $id = $param['id']; | ||
| 188 | }else{ | 189 | }else{ |
| 189 | $param['uuid'] = md5(date('YmdHis').rand(100,999).$this->user['project_id']); | 190 | $param['uuid'] = md5(date('YmdHis').rand(100,999).$this->user['project_id']); |
| 190 | - $this->model->addReturnId($param); | 191 | + $id = $this->model->addReturnId($param); |
| 191 | } | 192 | } |
| 192 | - $aiBlogService = new AiBlogService($this->user['project_id']); | ||
| 193 | - $aiBlogService->createCustomBlog($data); | ||
| 194 | }catch (\Exception $e){ | 193 | }catch (\Exception $e){ |
| 195 | $this->fail('保存失败,请联系管理员'); | 194 | $this->fail('保存失败,请联系管理员'); |
| 196 | } | 195 | } |
| 196 | + $aiBlogService = new AiBlogService($this->user['project_id']); | ||
| 197 | + $result = $aiBlogService->createCustomBlog($data); | ||
| 198 | + if($result['status'] == 200){ | ||
| 199 | + $this->model->edit(['task_id'=>$result['data']['task_id']],['id'=>$param['id']]); | ||
| 200 | + } | ||
| 197 | //todo::更新列表页 | 201 | //todo::更新列表页 |
| 198 | // shell_exec("php artisan save_ai_blog_list {$this->user['project_id']} > /dev/null 2>&1 &"); | 202 | // shell_exec("php artisan save_ai_blog_list {$this->user['project_id']} > /dev/null 2>&1 &"); |
| 199 | return $this->success(); | 203 | return $this->success(); |
-
请 注册 或 登录 后发表评论