From e12cd67f84eccb59e16741f813f711e066a65a9a Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Wed, 18 Oct 2023 11:38:32 +0800 Subject: [PATCH] xiugai liebiao --- app/Model/UserDoctor.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/app/Model/UserDoctor.php b/app/Model/UserDoctor.php index 923bacf..3515e15 100644 --- a/app/Model/UserDoctor.php +++ b/app/Model/UserDoctor.php @@ -324,14 +324,9 @@ class UserDoctor extends Model "Hospital:hospital_id,hospital_name,hospital_status,hospital_level_name,province_id,city_id", "DoctorExpertise", "DoctorInquiryConfig" => function ($query) use ($is_search_welfare_reception) { - $inquiry_type = [1,3]; - if (!empty($is_search_welfare_reception)){ - $inquiry_type = [3]; - } - - $query->whereIn('inquiry_type', $inquiry_type) - ->where('inquiry_mode', 1); + $query->where('inquiry_mode', 1); if (!empty($is_search_welfare_reception)){ + $query->where('inquiry_type', 3); $query->where('is_enable', 1); } }, @@ -353,18 +348,17 @@ class UserDoctor extends Model $query->where($doctor_expertise_params); }) ->whereHas('DoctorInquiryConfig', function ($query) use ($is_search_welfare_reception) { - $inquiry_type = [1,3]; - if (!empty($is_search_welfare_reception)){ - $inquiry_type = [3]; - } - $params = array(); $params['inquiry_mode'] = 1;// 接诊方式:图文 if (!empty($is_search_welfare_reception)){ $params['is_enable'] = 1; } - $query->where($params)->whereIn('inquiry_type', $inquiry_type); + $query->where($params); + + if (!empty($is_search_welfare_reception)){ + $query->where('inquiry_type', 3); + } }); if (!empty($sort_order)){