作者 lyh

gx

@@ -52,8 +52,8 @@ class KeywordLogic extends BaseLogic @@ -52,8 +52,8 @@ class KeywordLogic extends BaseLogic
52 * @time :2023/8/23 16:50 52 * @time :2023/8/23 16:50
53 */ 53 */
54 public function keywordSave(){ 54 public function keywordSave(){
55 -// DB::beginTransaction();  
56 -// try { 55 + DB::beginTransaction();
  56 + try {
57 $this->param = $this->handleSaveParam($this->param); 57 $this->param = $this->handleSaveParam($this->param);
58 if(isset($this->param['id']) && !empty($this->param['id'])){ 58 if(isset($this->param['id']) && !empty($this->param['id'])){
59 //TODO::不能修改路由 59 //TODO::不能修改路由
@@ -67,13 +67,13 @@ class KeywordLogic extends BaseLogic @@ -67,13 +67,13 @@ class KeywordLogic extends BaseLogic
67 $this->model->edit(['route'=>$route],['id'=>$id]); 67 $this->model->edit(['route'=>$route],['id'=>$id]);
68 } 68 }
69 // //清除缓存 69 // //清除缓存
70 -// Common::del_user_cache('product_keyword',$this->user['project_id']);  
71 -// DB::commit();  
72 -// }catch (\Exception $e){  
73 -// DB::rollBack();  
74 -// $this->fail('保存失败');  
75 -// }  
76 - $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route); 70 + Common::del_user_cache('product_keyword',$this->user['project_id']);
  71 + DB::commit();
  72 + }catch (\Exception $e){
  73 + DB::rollBack();
  74 + $this->fail('保存失败');
  75 + }
  76 +// $this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route);
77 $this->curlDelRoute(['new_route'=>$route]); 77 $this->curlDelRoute(['new_route'=>$route]);
78 return $this->success(); 78 return $this->success();
79 } 79 }