首页推荐医生
This commit is contained in:
parent
10e7fe3a91
commit
15dfe8d87f
@ -81,6 +81,14 @@ class UserDoctor extends Model
|
||||
return $this->hasOne(Hospital::class, 'hospital_id', 'hospital_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联用户表
|
||||
*/
|
||||
public function User(): HasOne
|
||||
{
|
||||
return $this->hasOne(User::class, 'user_id', 'user_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联问诊配置表(一对多)
|
||||
* @return HasMany
|
||||
@ -108,13 +116,6 @@ class UserDoctor extends Model
|
||||
return $this->hasMany(OrderInquiry::class, "doctor_id", "doctor_id");
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 关联职称表
|
||||
// */
|
||||
// public function BasicDoctorTitle(): HasOne
|
||||
// {
|
||||
// return $this->hasOne(BasicDoctorTitle::class, 'doctor_title_id', 'doctor_title_id');
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取医生信息-单条
|
||||
@ -189,6 +190,7 @@ class UserDoctor extends Model
|
||||
$datas = self::with([
|
||||
'Hospital:hospital_id,hospital_name,hospital_level_name',
|
||||
"DoctorInquiryConfig",
|
||||
"User"
|
||||
])
|
||||
->where($params)
|
||||
->orderBy("is_recommend", "desc")
|
||||
|
||||
@ -739,7 +739,6 @@ class PatientDoctorService extends BaseService
|
||||
"doctor_title",
|
||||
"department_custom_name",
|
||||
"hospital_id",
|
||||
"is_online",
|
||||
"be_good_at",
|
||||
];
|
||||
|
||||
@ -758,12 +757,15 @@ class PatientDoctorService extends BaseService
|
||||
$data['avatar'] = addAliyunOssWebsite($recommend_doctor['avatar']);
|
||||
$data['doctor_title'] = empty($recommend_doctor['doctor_title']) ? "" : DoctorTitleCode::getMessage($recommend_doctor['doctor_title']);
|
||||
$data['department_custom_name'] = $recommend_doctor['department_custom_name'];
|
||||
$data['is_online'] = $recommend_doctor['is_online'];
|
||||
$data['be_good_at'] = $recommend_doctor['be_good_at'];
|
||||
$data['hospital_name'] = $recommend_doctor['Hospital']['hospital_name'] ?? "";
|
||||
$data['hospital_level_name'] = $recommend_doctor['Hospital']['hospital_level_name'] ?? "";
|
||||
$data['multi_point_enable'] = 0; // 是否开启问诊购药
|
||||
|
||||
if (!empty($recommend_doctor['user'])){
|
||||
$data['is_online'] = $recommend_doctor['user']['is_online'];
|
||||
}
|
||||
|
||||
// 处理接诊价格
|
||||
$data['price'] = 0;
|
||||
$data['free_clinic_price'] = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user