套餐对比 过滤材料费

main
yanzai 1 year ago
parent 0998e10219
commit 1da1640c49

@ -461,6 +461,13 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
->whereIn('a.combo_id', $combo_ids)->where(['a.status' => 1])->get(); ->whereIn('a.combo_id', $combo_ids)->where(['a.status' => 1])->get();
foreach ($combos as $key => $combo) { foreach ($combos as $key => $combo) {
$combo->items = json_decode($combo->items, true); $combo->items = json_decode($combo->items, true);
$item_list=[];
foreach ($combo->items as $key => $item) {
if($item['keshi_name']<>'材料费'){
$item_list[]=$item;
}
}
$combo->items=$item_list;
$count = DB::table('orders')->where(['combo_id' => $combo->combo_id])->whereIn('status', [2, 4])->count(); $count = DB::table('orders')->where(['combo_id' => $combo->combo_id])->whereIn('status', [2, 4])->count();
$combo->saleCount = $count; $combo->saleCount = $count;
} }

Loading…
Cancel
Save