正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -54,7 +54,7 @@ class KeywordLogic extends BaseLogic | @@ -54,7 +54,7 @@ class KeywordLogic extends BaseLogic | ||
| 54 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 54 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 55 | $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $this->param['id'], $this->user['project_id']); | 55 | $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $this->param['id'], $this->user['project_id']); |
| 56 | $id = $this->editCategoryRoute($this->param['id'],$route); | 56 | $id = $this->editCategoryRoute($this->param['id'],$route); |
| 57 | - $this->model->edit($this->param,['id'=>$this->param['id']]); | 57 | + $this->model->edit($this->param,['id'=>$id]); |
| 58 | }else{ | 58 | }else{ |
| 59 | $this->param['project_id'] = $this->user['project_id']; | 59 | $this->param['project_id'] = $this->user['project_id']; |
| 60 | $this->param['created_at'] = date('Y-m-d H:i:s'); | 60 | $this->param['created_at'] = date('Y-m-d H:i:s'); |
| @@ -62,8 +62,8 @@ class KeywordLogic extends BaseLogic | @@ -62,8 +62,8 @@ class KeywordLogic extends BaseLogic | ||
| 62 | $id = $this->model->insertGetId($this->param); | 62 | $id = $this->model->insertGetId($this->param); |
| 63 | //路由映射 | 63 | //路由映射 |
| 64 | $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); | 64 | $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); |
| 65 | - } | ||
| 66 | $this->model->edit(['route'=>$route],['id'=>$id]); | 65 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| 66 | + } | ||
| 67 | //清除缓存 | 67 | //清除缓存 |
| 68 | Common::del_user_cache('product_keyword',$this->user['project_id']); | 68 | Common::del_user_cache('product_keyword',$this->user['project_id']); |
| 69 | DB::commit(); | 69 | DB::commit(); |
-
请 注册 或 登录 后发表评论