|
...
|
...
|
@@ -356,17 +356,22 @@ class KeywordLogic extends BaseLogic |
|
|
|
* @time :2025/6/9 14:29
|
|
|
|
*/
|
|
|
|
public function saveComment(){
|
|
|
|
$param = [
|
|
|
|
'nickname' => $this->param['nickname'],
|
|
|
|
'text' => $this->param['text'],
|
|
|
|
'project_id' => $this->user['project_id'],
|
|
|
|
'type' => 1,
|
|
|
|
'uid' => 0,
|
|
|
|
'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);
|
|
|
|
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'],
|
|
|
|
'project_id' => $this->user['project_id'],
|
|
|
|
'type' => 1,
|
|
|
|
'uid' => 0,
|
|
|
|
'created_at' => date('Y-m-d H:i:s'),
|
|
|
|
'updated_at' => date('Y-m-d H:i:s')
|
|
|
|
];
|
|
|
|
$id = $keywordCommonModel->addReturnId($param);
|
|
|
|
}
|
|
|
|
return $this->success(['id'=>$id]);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|