正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
| @@ -283,8 +283,8 @@ class ProductLogic extends BaseLogic | @@ -283,8 +283,8 @@ class ProductLogic extends BaseLogic | ||
| 283 | * @time :2023/8/15 17:53 | 283 | * @time :2023/8/15 17:53 |
| 284 | */ | 284 | */ |
| 285 | public function batchSetCategory(){ | 285 | public function batchSetCategory(){ |
| 286 | - DB::beginTransaction(); | ||
| 287 | - try { | 286 | +// DB::beginTransaction(); |
| 287 | +// try { | ||
| 288 | //删除分类关联表记录 | 288 | //删除分类关联表记录 |
| 289 | $categoryRelatedModel = new CategoryRelated(); | 289 | $categoryRelatedModel = new CategoryRelated(); |
| 290 | $categoryRelatedModel->del(['product_id'=>['in',$this->param['id']]]); | 290 | $categoryRelatedModel->del(['product_id'=>['in',$this->param['id']]]); |
| @@ -300,12 +300,12 @@ class ProductLogic extends BaseLogic | @@ -300,12 +300,12 @@ class ProductLogic extends BaseLogic | ||
| 300 | CategoryRelated::saveRelated($v1,$v2); | 300 | CategoryRelated::saveRelated($v1,$v2); |
| 301 | } | 301 | } |
| 302 | } | 302 | } |
| 303 | - DB::commit(); | ||
| 304 | - //对应添加关联表 | ||
| 305 | - }catch (\Exception $e){ | ||
| 306 | - DB::rollBack(); | ||
| 307 | - $this->fail('error'); | ||
| 308 | - } | 303 | +// DB::commit(); |
| 304 | +// //对应添加关联表 | ||
| 305 | +// }catch (\Exception $e){ | ||
| 306 | +// DB::rollBack(); | ||
| 307 | +// $this->fail('error'); | ||
| 308 | +// } | ||
| 309 | return $this->success(); | 309 | return $this->success(); |
| 310 | } | 310 | } |
| 311 | } | 311 | } |
-
请 注册 或 登录 后发表评论