正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
| @@ -149,8 +149,8 @@ class CategoryLogic extends BaseLogic | @@ -149,8 +149,8 @@ class CategoryLogic extends BaseLogic | ||
| 149 | */ | 149 | */ |
| 150 | public function categoryDelete(){ | 150 | public function categoryDelete(){ |
| 151 | $ids = $this->param['ids']; | 151 | $ids = $this->param['ids']; |
| 152 | - DB::beginTransaction(); | ||
| 153 | - try { | 152 | +// DB::beginTransaction(); |
| 153 | +// try { | ||
| 154 | $productModel = new Product(); | 154 | $productModel = new Product(); |
| 155 | foreach ($ids as $id){ | 155 | foreach ($ids as $id){ |
| 156 | $product_info = $productModel->read(['category_id'=>['like','%,'.$id.',%']]); | 156 | $product_info = $productModel->read(['category_id'=>['like','%,'.$id.',%']]); |
| @@ -163,11 +163,11 @@ class CategoryLogic extends BaseLogic | @@ -163,11 +163,11 @@ class CategoryLogic extends BaseLogic | ||
| 163 | } | 163 | } |
| 164 | //清除缓存 | 164 | //清除缓存 |
| 165 | Common::del_user_cache('product_category',$this->user['project_id']); | 165 | Common::del_user_cache('product_category',$this->user['project_id']); |
| 166 | - DB::commit(); | ||
| 167 | - }catch (\Exception $e){ | ||
| 168 | - DB::rollBack(); | ||
| 169 | - $this->fail('删除失败'); | ||
| 170 | - } | 166 | +// DB::commit(); |
| 167 | +// }catch (\Exception $e){ | ||
| 168 | +// DB::rollBack(); | ||
| 169 | +// $this->fail('删除失败'); | ||
| 170 | +// } | ||
| 171 | return $this->success(); | 171 | return $this->success(); |
| 172 | } | 172 | } |
| 173 | 173 |
-
请 注册 或 登录 后发表评论