|
...
|
...
|
@@ -149,8 +149,8 @@ class CategoryLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function categoryDelete(){
|
|
|
|
$ids = $this->param['ids'];
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
$productModel = new Product();
|
|
|
|
foreach ($ids as $id){
|
|
|
|
$product_info = $productModel->read(['category_id'=>['like','%,'.$id.',%']]);
|
|
...
|
...
|
@@ -163,11 +163,11 @@ class CategoryLogic extends BaseLogic |
|
|
|
}
|
|
|
|
//清除缓存
|
|
|
|
Common::del_user_cache('product_category',$this->user['project_id']);
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('删除失败');
|
|
|
|
}
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('删除失败');
|
|
|
|
// }
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|