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(); }