|
|
|
@ -104,7 +104,7 @@ class ComboController extends Controller
|
|
|
|
$sql = $sql . " and a.type_id=? ";
|
|
|
|
$sql = $sql . " and a.type_id=? ";
|
|
|
|
$canshu[] = $combo_type;
|
|
|
|
$canshu[] = $combo_type;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$sql = $sql. " and a.type_id<>19 or a.type_id is null ";
|
|
|
|
$sql = $sql. " and ( a.type_id<>19 or a.type_id is null) ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($combo_crowd)) {
|
|
|
|
if (isset($combo_crowd)) {
|
|
|
|
$sql = $sql . " and a.crowd_id=? ";
|
|
|
|
$sql = $sql . " and a.crowd_id=? ";
|
|
|
|
@ -184,9 +184,18 @@ class ComboController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
$combos = DB::select("select * from combos as a LEFT JOIN (
|
|
|
|
$combos = DB::select("select * from combos as a LEFT JOIN (
|
|
|
|
select combo_id as c_id,count(*) as count from combo_items where status in(1) and keshi_name<>'材料费' group by combo_id
|
|
|
|
select combo_id as c_id,count(*) as count from combo_items where status in(1) and keshi_name<>'材料费' 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 " . $sql ." ", $canshu);
|
|
|
|
|
|
|
|
$combos_list=[];
|
|
|
|
foreach ($combos as $key => $combo) {
|
|
|
|
foreach ($combos as $key => $combo) {
|
|
|
|
|
|
|
|
if(json_decode($combo->beizhu, JSON_UNESCAPED_UNICODE)){
|
|
|
|
|
|
|
|
$beizhu=json_decode($combo->beizhu, JSON_UNESCAPED_UNICODE);
|
|
|
|
|
|
|
|
if(isset($beizhu['可用渠道']) and !empty($beizhu['可用渠道'])){
|
|
|
|
|
|
|
|
$qudao=$beizhu['可用渠道'];
|
|
|
|
|
|
|
|
if(!in_array('H5',$qudao)){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
$combo->count=$combo->count?$combo->count:0;
|
|
|
|
$combo->count=$combo->count?$combo->count:0;
|
|
|
|
$tags = json_decode($combo->tags, true);
|
|
|
|
$tags = json_decode($combo->tags, true);
|
|
|
|
$combo->tags2 = json_decode($combo->tags2, true);
|
|
|
|
$combo->tags2 = json_decode($combo->tags2, true);
|
|
|
|
@ -228,7 +237,7 @@ select combo_id as c_id,count(*) as count from combo_items where status in(1) an
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$combo->duo_xuan_yi =$duo_xuan_yi;
|
|
|
|
$combo->duo_xuan_yi =$duo_xuan_yi;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$combos_list[]=$combo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$hospital_info = $hospital;
|
|
|
|
$hospital_info = $hospital;
|
|
|
|
@ -279,7 +288,7 @@ select combo_id as c_id,count(*) as count from combo_items where status in(1) an
|
|
|
|
MIN(price) AS lowest_price
|
|
|
|
MIN(price) AS lowest_price
|
|
|
|
FROM combos;");
|
|
|
|
FROM combos;");
|
|
|
|
return \Yz::Return(true, '获取成功', [
|
|
|
|
return \Yz::Return(true, '获取成功', [
|
|
|
|
'list' => $combos,
|
|
|
|
'list' => $combos_list,
|
|
|
|
'hospital' => $hospital_info,
|
|
|
|
'hospital' => $hospital_info,
|
|
|
|
'doctor' => $doctor_info,
|
|
|
|
'doctor' => $doctor_info,
|
|
|
|
'info' => $info,
|
|
|
|
'info' => $info,
|
|
|
|
|