作者 lyh

gx

... ... @@ -50,13 +50,13 @@ class BlogCategoryLogic extends BaseLogic
//处理子集
$this->addProcessingSon($id);
}
$this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route);
$this->curlDelRoute(['new_route'=>$route]);
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('系统错误,请联系管理');
}
$this->addUpdateNotify(RouteMap::SOURCE_BLOG_CATE,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...
... ... @@ -42,13 +42,13 @@ class BlogLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']);
$this->edit(['url'=>$route],['id'=>$id]);
}
$this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route);
$this->curlDelRoute(['new_route'=>$route]);
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('error');
}
$this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...
... ... @@ -60,13 +60,13 @@ class NewsCategoryLogic extends BaseLogic
//当父级分类拥有产品时,处理子集
$this->addProcessingSon($id);
}
$this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route);
$this->curlDelRoute(['new_route'=>$route]);
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('系统错误,请联系管理员');
}
$this->addUpdateNotify(RouteMap::SOURCE_NEWS_CATE,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...
... ... @@ -72,14 +72,14 @@ class NewsLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $id, $this->user['project_id']);
$this->edit(['url' => $route], ['id' => $id]);
}
$this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route);
$this->curlDelRoute(['new_route'=>$route]);
//更新路由
DB::commit();
} catch (\Exception $e) {
DB::rollBack();
$this->fail('系统错误,请联系管理员');
}
$this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...
... ... @@ -126,8 +126,6 @@ class CategoryLogic extends BaseLogic
//处理子集
$this->addProcessingSon($id);
}
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route);
$this->curlDelRoute(['new_route'=>$route]);
//清除缓存
Common::del_user_cache('product_category',$this->user['project_id']);
DB::commit();
... ... @@ -135,6 +133,8 @@ class CategoryLogic extends BaseLogic
DB::rollBack();
$this->fail('系统错误,请联系管理员');
}
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_CATE,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...
... ... @@ -66,8 +66,6 @@ class KeywordLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
$this->model->edit(['route'=>$route],['id'=>$id]);
}
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route);
$this->curlDelRoute(['new_route'=>$route]);
//清除缓存
Common::del_user_cache('product_keyword',$this->user['project_id']);
DB::commit();
... ... @@ -75,6 +73,8 @@ class KeywordLogic extends BaseLogic
DB::rollBack();
$this->fail('保存失败');
}
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...
... ... @@ -56,8 +56,6 @@ class ProductLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']);
$this->model->edit(['route'=>$route],['id'=>$id]);
}
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route);
$this->curlDelRoute(['new_route'=>$route]);
//产品分类关联
CategoryRelated::saveRelated($id, $category_ids);
//保存扩展字段
... ... @@ -65,6 +63,8 @@ class ProductLogic extends BaseLogic
}catch (\Exception $e){
$this->fail('系统错误请联系管理员');
}
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
}
... ...