正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
| @@ -30,8 +30,8 @@ class ProductLogic extends BaseLogic | @@ -30,8 +30,8 @@ class ProductLogic extends BaseLogic | ||
| 30 | public function productSave(){ | 30 | public function productSave(){ |
| 31 | //封面取第一个图片 | 31 | //封面取第一个图片 |
| 32 | $this->param['thumb'] = $this->param['gallery'][0] ?? ''; | 32 | $this->param['thumb'] = $this->param['gallery'][0] ?? ''; |
| 33 | - DB::beginTransaction(); | ||
| 34 | - try { | 33 | +// DB::beginTransaction(); |
| 34 | +// try { | ||
| 35 | $this->param['created_uid'] = $this->user['id']; | 35 | $this->param['created_uid'] = $this->user['id']; |
| 36 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 36 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 37 | $id = $this->param['id']; | 37 | $id = $this->param['id']; |
| @@ -44,11 +44,11 @@ class ProductLogic extends BaseLogic | @@ -44,11 +44,11 @@ class ProductLogic extends BaseLogic | ||
| 44 | } | 44 | } |
| 45 | //路由映射 | 45 | //路由映射 |
| 46 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); | 46 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); |
| 47 | - DB::commit(); | ||
| 48 | - }catch (\Exception $e){ | ||
| 49 | - DB::rollBack(); | ||
| 50 | - $this->fail('保存失败'); | ||
| 51 | - } | 47 | +// DB::commit(); |
| 48 | +// }catch (\Exception $e){ | ||
| 49 | +// DB::rollBack(); | ||
| 50 | +// $this->fail('保存失败'); | ||
| 51 | +// } | ||
| 52 | //通知更新 | 52 | //通知更新 |
| 53 | $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$route]); | 53 | $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$route]); |
| 54 | return $this->success(); | 54 | return $this->success(); |
-
请 注册 或 登录 后发表评论