From b065c35910a4967d56b87cd35a352240dac35e66 Mon Sep 17 00:00:00 2001 From: yanzai Date: Mon, 16 Dec 2024 17:30:05 +0800 Subject: [PATCH] Update ComboItemGroupService.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据推送的套餐 是否可选 进行删除判断 --- Laravel/app/Services/ComboItemGroupService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Laravel/app/Services/ComboItemGroupService.php b/Laravel/app/Services/ComboItemGroupService.php index 08222f8..759d5f0 100644 --- a/Laravel/app/Services/ComboItemGroupService.php +++ b/Laravel/app/Services/ComboItemGroupService.php @@ -28,6 +28,11 @@ class ComboItemGroupService } $sixin_combo_item_ids=[];//思信套餐内项目ids if($combo['变更类别']=='修改' || $combo['变更类别']=='新增'){ + if($combo['可选']===false){//如果可选为false,则删除 + DB::table('combos')->where(['combo_id' => $combo['Id']])->delete(); + DB::table('combo_items')->where(['combo_id' => $combo['Id']])->delete(); + return \Yz::echoError1('删除成功'); + } $item = []; foreach ($combo['包含项目'] as $key => $v) { $sixin_combo_item_ids[]=$v['Id'];