|
|
|
@ -351,6 +351,24 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
|
|
|
|
$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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($combos as $key => $combo) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$tags = json_decode($combo->tags, true);
|
|
|
|
|
|
|
|
$combo->tags2 = json_decode($combo->tags2, true);
|
|
|
|
|
|
|
|
foreach ($tags as $k => $tag) {
|
|
|
|
|
|
|
|
$tags[$k] = ['text' => $tag,
|
|
|
|
|
|
|
|
'text_color' => '#47ABD8',
|
|
|
|
|
|
|
|
'color' => '#EBF5FC'
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$combo->tags = $tags;
|
|
|
|
|
|
|
|
$combo->tags[] = [
|
|
|
|
|
|
|
|
'text' => $combo->item_count . '个项目',
|
|
|
|
|
|
|
|
'text_color' => '#34C292',
|
|
|
|
|
|
|
|
'color' => '#E9F8F3',
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
return \Yz::Return(true, "查询完成", ['list' => $combos]);
|
|
|
|
return \Yz::Return(true, "查询完成", ['list' => $combos]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|