正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
| @@ -518,8 +518,8 @@ class ProductLogic extends BaseLogic | @@ -518,8 +518,8 @@ class ProductLogic extends BaseLogic | ||
| 518 | public function setCopyProduct(){ | 518 | public function setCopyProduct(){ |
| 519 | $info = $this->model->read(['id'=>$this->param['id']]); | 519 | $info = $this->model->read(['id'=>$this->param['id']]); |
| 520 | $param = $this->setProductParams($info); | 520 | $param = $this->setProductParams($info); |
| 521 | - DB::beginTransaction(); | ||
| 522 | - try { | 521 | +// DB::beginTransaction(); |
| 522 | +// try { | ||
| 523 | $save_id = $this->model->insertGetId($param); | 523 | $save_id = $this->model->insertGetId($param); |
| 524 | CategoryRelated::saveRelated($save_id, $info['category_id']); | 524 | CategoryRelated::saveRelated($save_id, $info['category_id']); |
| 525 | $route = preg_replace('/-product.*/', '', $param['route']); | 525 | $route = preg_replace('/-product.*/', '', $param['route']); |
| @@ -532,11 +532,11 @@ class ProductLogic extends BaseLogic | @@ -532,11 +532,11 @@ class ProductLogic extends BaseLogic | ||
| 532 | $this->copyExtendInfo($info['id'],$save_id); | 532 | $this->copyExtendInfo($info['id'],$save_id); |
| 533 | $this->copyColumn($info['id'],$save_id); | 533 | $this->copyColumn($info['id'],$save_id); |
| 534 | $this->copyDetail($info['id'],$save_id); | 534 | $this->copyDetail($info['id'],$save_id); |
| 535 | - DB::commit(); | ||
| 536 | - }catch (\Exception $e){ | ||
| 537 | - DB::rollBack(); | ||
| 538 | - $this->fail('复制失败,请联系管理员'); | ||
| 539 | - } | 535 | +// DB::commit(); |
| 536 | +// }catch (\Exception $e){ | ||
| 537 | +// DB::rollBack(); | ||
| 538 | +// $this->fail('复制失败,请联系管理员'); | ||
| 539 | +// } | ||
| 540 | return $this->success(['id'=>$save_id]); | 540 | return $this->success(['id'=>$save_id]); |
| 541 | } | 541 | } |
| 542 | 542 |
-
请 注册 或 登录 后发表评论