作者 lyh

gx导入项目脚本

@@ -356,6 +356,11 @@ class KeywordLogic extends BaseLogic @@ -356,6 +356,11 @@ class KeywordLogic extends BaseLogic
356 * @time :2025/6/9 14:29 356 * @time :2025/6/9 14:29
357 */ 357 */
358 public function saveComment(){ 358 public function saveComment(){
  359 + $keywordCommonModel = new AggregateKeywordComment();
  360 + if(isset($this->param['id']) && !empty($this->param['id'])){
  361 + $id = $this->param['id'];
  362 + $keywordCommonModel->edit($this->param,['id'=>$this->param['id']]);
  363 + }else{
359 $param = [ 364 $param = [
360 'nickname' => $this->param['nickname'], 365 'nickname' => $this->param['nickname'],
361 'text' => $this->param['text'], 366 'text' => $this->param['text'],
@@ -365,8 +370,8 @@ class KeywordLogic extends BaseLogic @@ -365,8 +370,8 @@ class KeywordLogic extends BaseLogic
365 'created_at' => date('Y-m-d H:i:s'), 370 'created_at' => date('Y-m-d H:i:s'),
366 'updated_at' => date('Y-m-d H:i:s') 371 'updated_at' => date('Y-m-d H:i:s')
367 ]; 372 ];
368 - $keywordCommonModel = new AggregateKeywordComment();  
369 $id = $keywordCommonModel->addReturnId($param); 373 $id = $keywordCommonModel->addReturnId($param);
  374 + }
370 return $this->success(['id'=>$id]); 375 return $this->success(['id'=>$id]);
371 } 376 }
372 377