正在显示
8 个修改的文件
包含
9 行增加
和
1 行删除
| @@ -47,6 +47,7 @@ class BlogCategoryLogic extends BaseLogic | @@ -47,6 +47,7 @@ class BlogCategoryLogic extends BaseLogic | ||
| 47 | $id = $this->model->addReturnId($this->param); | 47 | $id = $this->model->addReturnId($this->param); |
| 48 | $route = RouteMap::setRoute($this->param['alias'], RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); | 48 | $route = RouteMap::setRoute($this->param['alias'], RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); |
| 49 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route); | 49 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route); |
| 50 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 50 | $this->edit(['alias'=>$route],['id'=>$id]); | 51 | $this->edit(['alias'=>$route],['id'=>$id]); |
| 51 | //处理子集 | 52 | //处理子集 |
| 52 | $this->addProcessingSon($id); | 53 | $this->addProcessingSon($id); |
| @@ -41,6 +41,7 @@ class BlogLogic extends BaseLogic | @@ -41,6 +41,7 @@ class BlogLogic extends BaseLogic | ||
| 41 | $id = $this->model->addReturnId($this->param); | 41 | $id = $this->model->addReturnId($this->param); |
| 42 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); | 42 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); |
| 43 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route); | 43 | $this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route); |
| 44 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 44 | $this->edit(['url'=>$route],['id'=>$id]); | 45 | $this->edit(['url'=>$route],['id'=>$id]); |
| 45 | } | 46 | } |
| 46 | DB::commit(); | 47 | DB::commit(); |
| @@ -115,6 +115,7 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -115,6 +115,7 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 115 | $id, $this->user['project_id']); | 115 | $id, $this->user['project_id']); |
| 116 | $this->handleAddSon($id); | 116 | $this->handleAddSon($id); |
| 117 | $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],$route); | 117 | $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],$route); |
| 118 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 118 | $this->edit(['url' => $route], ['id' => $id]); | 119 | $this->edit(['url' => $route], ['id' => $id]); |
| 119 | }catch (\Exception $e){ | 120 | }catch (\Exception $e){ |
| 120 | $this->fail('系统错误,请联系管理员'); | 121 | $this->fail('系统错误,请联系管理员'); |
| @@ -57,6 +57,7 @@ class NewsCategoryLogic extends BaseLogic | @@ -57,6 +57,7 @@ class NewsCategoryLogic extends BaseLogic | ||
| 57 | $id = $this->model->addReturnId($this->param); | 57 | $id = $this->model->addReturnId($this->param); |
| 58 | $route = RouteMap::setRoute($this->param['alias'], RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']); | 58 | $route = RouteMap::setRoute($this->param['alias'], RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']); |
| 59 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route); | 59 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route); |
| 60 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 60 | $this->model->edit(['alias'=>$route],['id'=>$id]); | 61 | $this->model->edit(['alias'=>$route],['id'=>$id]); |
| 61 | //当父级分类拥有产品时,处理子集 | 62 | //当父级分类拥有产品时,处理子集 |
| 62 | $this->addProcessingSon($id); | 63 | $this->addProcessingSon($id); |
| @@ -71,6 +71,7 @@ class NewsLogic extends BaseLogic | @@ -71,6 +71,7 @@ class NewsLogic extends BaseLogic | ||
| 71 | $id = $this->model->addReturnId($this->param); | 71 | $id = $this->model->addReturnId($this->param); |
| 72 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $id, $this->user['project_id']); | 72 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $id, $this->user['project_id']); |
| 73 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route); | 73 | $this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route); |
| 74 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 74 | $this->edit(['url' => $route], ['id' => $id]); | 75 | $this->edit(['url' => $route], ['id' => $id]); |
| 75 | } | 76 | } |
| 76 | //更新路由 | 77 | //更新路由 |
| @@ -100,7 +101,6 @@ class NewsLogic extends BaseLogic | @@ -100,7 +101,6 @@ class NewsLogic extends BaseLogic | ||
| 100 | return true; | 101 | return true; |
| 101 | } | 102 | } |
| 102 | 103 | ||
| 103 | - | ||
| 104 | /** | 104 | /** |
| 105 | * @name :编辑seo | 105 | * @name :编辑seo |
| 106 | * @return void | 106 | * @return void |
| @@ -123,6 +123,7 @@ class CategoryLogic extends BaseLogic | @@ -123,6 +123,7 @@ class CategoryLogic extends BaseLogic | ||
| 123 | $id = $this->model->addReturnId($this->param); | 123 | $id = $this->model->addReturnId($this->param); |
| 124 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']); | 124 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT_CATE, $id, $this->user['project_id']); |
| 125 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route); | 125 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route); |
| 126 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 126 | $this->edit(['route'=>$route],['id'=>$id]); | 127 | $this->edit(['route'=>$route],['id'=>$id]); |
| 127 | //处理子集 | 128 | //处理子集 |
| 128 | $this->addProcessingSon($id); | 129 | $this->addProcessingSon($id); |
| @@ -64,6 +64,7 @@ class KeywordLogic extends BaseLogic | @@ -64,6 +64,7 @@ class KeywordLogic extends BaseLogic | ||
| 64 | //路由映射 | 64 | //路由映射 |
| 65 | $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); | 65 | $route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']); |
| 66 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route); | 66 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route); |
| 67 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 67 | $this->model->edit(['route'=>$route],['id'=>$id]); | 68 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| 68 | } | 69 | } |
| 69 | //清除缓存 | 70 | //清除缓存 |
| @@ -142,6 +143,7 @@ class KeywordLogic extends BaseLogic | @@ -142,6 +143,7 @@ class KeywordLogic extends BaseLogic | ||
| 142 | foreach ($idArr as $v){ | 143 | foreach ($idArr as $v){ |
| 143 | $this->model = new Keyword(); | 144 | $this->model = new Keyword(); |
| 144 | $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $this->user['project_id']); | 145 | $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $this->user['project_id']); |
| 146 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 145 | $this->model->edit(['route'=>$route],['id'=>$v['id']]); | 147 | $this->model->edit(['route'=>$route],['id'=>$v['id']]); |
| 146 | } | 148 | } |
| 147 | }catch (\Exception $e){ | 149 | }catch (\Exception $e){ |
| @@ -57,6 +57,7 @@ class ProductLogic extends BaseLogic | @@ -57,6 +57,7 @@ class ProductLogic extends BaseLogic | ||
| 57 | $id = $this->model->addReturnId($this->param); | 57 | $id = $this->model->addReturnId($this->param); |
| 58 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); | 58 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); |
| 59 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route); | 59 | $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route); |
| 60 | + $this->curlDelRoute(['new_route'=>$route]); | ||
| 60 | $this->model->edit(['route'=>$route],['id'=>$id]); | 61 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| 61 | } | 62 | } |
| 62 | //产品分类关联 | 63 | //产品分类关联 |
-
请 注册 或 登录 后发表评论