From ba91b80fb499de9b558a03b5f48b91c7ad128b2d Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Sat, 12 Oct 2024 14:07:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=8C=BB=E7=94=9F=EF=BC=8C=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E6=95=B0=E9=87=8F=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Model/UserDoctor.php | 5 +---- app/Services/PatientDoctorService.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Model/UserDoctor.php b/app/Model/UserDoctor.php index e09ebe5..af4ba3a 100644 --- a/app/Model/UserDoctor.php +++ b/app/Model/UserDoctor.php @@ -170,12 +170,10 @@ class UserDoctor extends Model * 2:接诊量由高到低的医生 * 3:好评率由高到低的医生 * 5:在线 - * 6:5个 - * @param int $limit 数量 * @param array $fields * @return array|Collection|\Hyperf\Utils\Collection */ - public static function getIndexRecommendDoctorLimit(int $limit = 5, array $fields = ['*']): array|Collection|\Hyperf\Utils\Collection + public static function getIndexRecommendDoctor(array $fields = ['*']): array|Collection|\Hyperf\Utils\Collection { $params = array(); // 状态(0:禁用 1:正常 2:删除) @@ -200,7 +198,6 @@ class UserDoctor extends Model ->orderBy("is_platform_deep_cooperation", "desc") ->orderBy("served_patients_num", "desc") ->orderBy("praise_rate", "desc") - ->limit($limit) ->get($fields); diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 29b3ab6..0342484 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -481,7 +481,7 @@ class PatientDoctorService extends BaseService "be_good_at", ]; - $recommend_doctors = UserDoctorModel::getIndexRecommendDoctorLimit(5, $fields); + $recommend_doctors = UserDoctorModel::getIndexRecommendDoctor($fields); if (empty($recommend_doctors)) { return success(); }