|
|
|
@ -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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|