正在显示
1 个修改的文件
包含
3 行增加
和
0 行删除
| @@ -107,6 +107,8 @@ class KeywordLogic extends BaseLogic | @@ -107,6 +107,8 @@ class KeywordLogic extends BaseLogic | ||
| 107 | public function batchAdd(){ | 107 | public function batchAdd(){ |
| 108 | if(!empty($this->param['title']) && is_array($this->param['title'])){ | 108 | if(!empty($this->param['title']) && is_array($this->param['title'])){ |
| 109 | foreach ($this->param['title'] as $v){ | 109 | foreach ($this->param['title'] as $v){ |
| 110 | + $info = $this->model->read(['title'=>$v]); | ||
| 111 | + if($info === false){ | ||
| 110 | $param['project_id'] = $this->user['project_id']; | 112 | $param['project_id'] = $this->user['project_id']; |
| 111 | $param['created_at'] = date('Y-m-d H:i:s'); | 113 | $param['created_at'] = date('Y-m-d H:i:s'); |
| 112 | $param['updated_at'] = $param['created_at']; | 114 | $param['updated_at'] = $param['created_at']; |
| @@ -117,6 +119,7 @@ class KeywordLogic extends BaseLogic | @@ -117,6 +119,7 @@ class KeywordLogic extends BaseLogic | ||
| 117 | $this->model->edit(['route'=>$route],['id'=>$id]); | 119 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| 118 | } | 120 | } |
| 119 | } | 121 | } |
| 122 | + } | ||
| 120 | return $this->success(); | 123 | return $this->success(); |
| 121 | } | 124 | } |
| 122 | 125 |
-
请 注册 或 登录 后发表评论