套餐根据性别筛选

wenjuan
yanzai 1 year ago
parent 3c5c58949e
commit da0d0bf9ed

@ -89,11 +89,11 @@ class ComboController extends Controller
}
}
$canshu[]=$person->sex;
$combos = DB::select("select * from combos as a LEFT JOIN (
select combo_id as c_id,count(*) as count from orders where status in(2,4) group by combo_id
) as b on a.combo_id=b.c_id where a.status=1" . $sql, $canshu);
) as b on a.combo_id=b.c_id where a.status=1 and a.sex=?" . $sql, $canshu);
foreach ($combos as $key => $combo) {
$combo->count=$combo->count?$combo->count:0;

@ -18,7 +18,6 @@ class ItemController extends Controller
$group_arr = [];
$group_list = [];
foreach ($items as $item) {
$push_type = false;
if ($search == '') {
$push_type = true;

Loading…
Cancel
Save