作者 lyh

gx

@@ -51,8 +51,8 @@ class ProductLogic extends BaseLogic @@ -51,8 +51,8 @@ class ProductLogic extends BaseLogic
51 $category_ids = $this->getLastCategoryArr($this->param['category_id']); 51 $category_ids = $this->getLastCategoryArr($this->param['category_id']);
52 $this->param['category_id'] = ','.implode(',',$category_ids).','; 52 $this->param['category_id'] = ','.implode(',',$category_ids).',';
53 } 53 }
54 -// DB::connection('custom_mysql')->beginTransaction();  
55 -// try { 54 + DB::connection('custom_mysql')->beginTransaction();
  55 + try {
56 if(isset($this->param['id']) && !empty($this->param['id'])){ 56 if(isset($this->param['id']) && !empty($this->param['id'])){
57 $id = $this->param['id']; 57 $id = $this->param['id'];
58 //查看路由是否更新 58 //查看路由是否更新
@@ -68,11 +68,11 @@ class ProductLogic extends BaseLogic @@ -68,11 +68,11 @@ class ProductLogic extends BaseLogic
68 CategoryRelated::saveRelated($id, $category_ids); 68 CategoryRelated::saveRelated($id, $category_ids);
69 //保存扩展字段 69 //保存扩展字段
70 $this->saveExtendInfo($id,$extend); 70 $this->saveExtendInfo($id,$extend);
71 -// DB::connection('custom_mysql')->commit();  
72 -// }catch (\Exception $e){  
73 -// DB::connection('custom_mysql')->rollBack();  
74 -// $this->fail('系统错误请联系管理员');  
75 -// } 71 + DB::connection('custom_mysql')->commit();
  72 + }catch (\Exception $e){
  73 + DB::connection('custom_mysql')->rollBack();
  74 + $this->fail('系统错误请联系管理员');
  75 + }
76 //通知更新 76 //通知更新
77 $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]); 77 $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]);
78 return $this->success(); 78 return $this->success();
@@ -110,12 +110,12 @@ class RouteMap extends Base @@ -110,12 +110,12 @@ class RouteMap extends Base
110 try { 110 try {
111 $route_map = self::where('project_id', $project_id)->where('source_id', $source_id)->where('source', $source)->first(); 111 $route_map = self::where('project_id', $project_id)->where('source_id', $source_id)->where('source', $source)->first();
112 //上线项目 不能修改链接了 112 //上线项目 不能修改链接了
113 - if($route_map){  
114 - $project = ProjectLogic::instance()->getInfo($project_id);  
115 - if($project['type'] !== Project::STATUS_ONE){  
116 - return $route_map->route;  
117 - }  
118 - } 113 +// if($route_map){
  114 +// $project = ProjectLogic::instance()->getInfo($project_id);
  115 +// if($project['type'] !== Project::STATUS_ONE){
  116 +// return $route_map->route;
  117 +// }
  118 +// }
119 if(!$route_map){ 119 if(!$route_map){
120 $route_map = new self(); 120 $route_map = new self();
121 $route_map->source = $source; 121 $route_map->source = $source;