Browse Source

处理item

develop
lemon 4 years ago
parent
commit
6e156601b4
  1. 4
      app/AdminAgent/Controllers/AgentProductController.php

4
app/AdminAgent/Controllers/AgentProductController.php

@ -397,6 +397,10 @@ class AgentProductController extends AdminController
if (array_filter($form->model()->toArray(), fn($v) => $v['agent_id'] != Admin::user()->id)) { if (array_filter($form->model()->toArray(), fn($v) => $v['agent_id'] != Admin::user()->id)) {
return $form->response()->error('数据不存在'); return $form->response()->error('数据不存在');
} }
//处理组合产品明细表
$ids = array_column($form->model()->toArray(),'id');
AgentProductItem::query()->whereIn('agent_product_id',$ids)->delete();
}); });
} }
} }
Loading…
Cancel
Save