根据选定的项目筛选套餐

main
yanzai 1 year ago
parent befc2fc3bd
commit cc197c601c

@ -97,6 +97,19 @@ class ComboController extends Controller
}
}
if(isset($combo_item)){
$combo_ids=DB::table('combo_items')->whereIn('item_id',$combo_item)->where(['status'=>1])
->groupBy('combo_id')
->havingRaw('COUNT(DISTINCT item_id) = '.count($combo_item))
->pluck('combo_id')->toArray();
$count = count($combo_ids);
$placeholders = implode(', ', array_fill(0, $count, '?'));
$sql = $sql . " and a.combo_id in ($placeholders) ";
$canshu =array_merge($canshu, $combo_ids);
}

@ -261,7 +261,7 @@
</view>
</view>
</view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10112145</view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10131106</view>
</view>
</view>
</template>

Loading…
Cancel
Save