作者 lyh

gx导入项目脚本

... ... @@ -356,6 +356,11 @@ class KeywordLogic extends BaseLogic
* @time :2025/6/9 14:29
*/
public function saveComment(){
$keywordCommonModel = new AggregateKeywordComment();
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$keywordCommonModel->edit($this->param,['id'=>$this->param['id']]);
}else{
$param = [
'nickname' => $this->param['nickname'],
'text' => $this->param['text'],
... ... @@ -365,8 +370,8 @@ class KeywordLogic extends BaseLogic
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
];
$keywordCommonModel = new AggregateKeywordComment();
$id = $keywordCommonModel->addReturnId($param);
}
return $this->success(['id'=>$id]);
}
... ...