正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
| @@ -28,8 +28,8 @@ class BlogCategoryLogic extends BaseLogic | @@ -28,8 +28,8 @@ class BlogCategoryLogic extends BaseLogic | ||
| 28 | public function categorySave(){ | 28 | public function categorySave(){ |
| 29 | //验证名称是否存在 | 29 | //验证名称是否存在 |
| 30 | $this->verifyParamName($this->param['name']); | 30 | $this->verifyParamName($this->param['name']); |
| 31 | - DB::beginTransaction(); | ||
| 32 | - try { | 31 | +// DB::beginTransaction(); |
| 32 | +// try { | ||
| 33 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 33 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 34 | //查看路由是否更新 | 34 | //查看路由是否更新 |
| 35 | $id = $this->editCategoryRoute($this->param['id'], $this->param['alias']); | 35 | $id = $this->editCategoryRoute($this->param['id'], $this->param['alias']); |
| @@ -46,11 +46,11 @@ class BlogCategoryLogic extends BaseLogic | @@ -46,11 +46,11 @@ class BlogCategoryLogic extends BaseLogic | ||
| 46 | $route = RouteMap::setRoute(isset($this->param['alias']) ? $this->param['alias'] : $this->param['name'], | 46 | $route = RouteMap::setRoute(isset($this->param['alias']) ? $this->param['alias'] : $this->param['name'], |
| 47 | RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); | 47 | RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); |
| 48 | $this->edit(['alias'=>$route],['id'=>$id]); | 48 | $this->edit(['alias'=>$route],['id'=>$id]); |
| 49 | - DB::commit(); | ||
| 50 | - }catch (\Exception $e){ | ||
| 51 | - DB::rollBack(); | ||
| 52 | - $this->fail('系统错误,请联系管理'); | ||
| 53 | - } | 49 | +// DB::commit(); |
| 50 | +// }catch (\Exception $e){ | ||
| 51 | +// DB::rollBack(); | ||
| 52 | +// $this->fail('系统错误,请联系管理'); | ||
| 53 | +// } | ||
| 54 | //通知更新 | 54 | //通知更新 |
| 55 | $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_BLOG_CATE, 'route'=>$route]); | 55 | $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_BLOG_CATE, 'route'=>$route]); |
| 56 | return $this->success(); | 56 | return $this->success(); |
-
请 注册 或 登录 后发表评论