作者 lyh

gx

@@ -44,7 +44,6 @@ class ProductLogic extends BaseLogic @@ -44,7 +44,6 @@ class ProductLogic extends BaseLogic
44 $category_ids = $this->handleCategory(); 44 $category_ids = $this->handleCategory();
45 //处理其他字段 45 //处理其他字段
46 $this->param = $this->handleSaveParam($this->param); 46 $this->param = $this->handleSaveParam($this->param);
47 - DB::connection('custom_mysql')->beginTransaction();  
48 try { 47 try {
49 if(isset($this->param['id']) && !empty($this->param['id'])){ 48 if(isset($this->param['id']) && !empty($this->param['id'])){
50 $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']); 49 $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']);
@@ -63,9 +62,7 @@ class ProductLogic extends BaseLogic @@ -63,9 +62,7 @@ class ProductLogic extends BaseLogic
63 CategoryRelated::saveRelated($id, $category_ids); 62 CategoryRelated::saveRelated($id, $category_ids);
64 //保存扩展字段 63 //保存扩展字段
65 $this->saveExtendInfo($id,$extend); 64 $this->saveExtendInfo($id,$extend);
66 - DB::connection('custom_mysql')->commit();  
67 }catch (\Exception $e){ 65 }catch (\Exception $e){
68 - DB::connection('custom_mysql')->rollBack();  
69 $this->fail('系统错误请联系管理员'); 66 $this->fail('系统错误请联系管理员');
70 } 67 }
71 return $this->success(); 68 return $this->success();