作者 lyh

gx

@@ -53,8 +53,8 @@ class ProductLogic extends BaseLogic @@ -53,8 +53,8 @@ class ProductLogic extends BaseLogic
53 }else{ 53 }else{
54 $this->param['category_id'] = ''; 54 $this->param['category_id'] = '';
55 } 55 }
56 - DB::connection('custom_mysql')->beginTransaction();  
57 - try { 56 +// DB::connection('custom_mysql')->beginTransaction();
  57 +// try {
58 if(isset($this->param['id']) && !empty($this->param['id'])){ 58 if(isset($this->param['id']) && !empty($this->param['id'])){
59 $id = $this->param['id']; 59 $id = $this->param['id'];
60 //查看路由是否更新 60 //查看路由是否更新
@@ -70,11 +70,11 @@ class ProductLogic extends BaseLogic @@ -70,11 +70,11 @@ class ProductLogic extends BaseLogic
70 CategoryRelated::saveRelated($id, $category_ids); 70 CategoryRelated::saveRelated($id, $category_ids);
71 //保存扩展字段 71 //保存扩展字段
72 $this->saveExtendInfo($id,$extend); 72 $this->saveExtendInfo($id,$extend);
73 - DB::connection('custom_mysql')->commit();  
74 - }catch (\Exception $e){  
75 - DB::connection('custom_mysql')->rollBack();  
76 - $this->fail('系统错误请联系管理员');  
77 - } 73 +// DB::connection('custom_mysql')->commit();
  74 +// }catch (\Exception $e){
  75 +// DB::connection('custom_mysql')->rollBack();
  76 +// $this->fail('系统错误请联系管理员');
  77 +// }
78 //通知更新 78 //通知更新
79 $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]); 79 $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]);
80 return $this->success(); 80 return $this->success();
@@ -154,6 +154,9 @@ class ProductLogic extends BaseLogic @@ -154,6 +154,9 @@ class ProductLogic extends BaseLogic
154 }else{ 154 }else{
155 $this->param['thumb'] = Arr::a2s([]); 155 $this->param['thumb'] = Arr::a2s([]);
156 } 156 }
  157 + if(isset($this->param['route']) && !empty($this->param['route'])){
  158 + $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']);
  159 + }
157 $this->model->edit($this->param,['id'=>$this->param['id']]); 160 $this->model->edit($this->param,['id'=>$this->param['id']]);
158 return $this->success(); 161 return $this->success();
159 } 162 }