迁移并合并医生问诊评价接口
This commit is contained in:
@@ -273,43 +273,6 @@ class PatientDoctorService extends BaseService
|
||||
return success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生评价
|
||||
* @return array
|
||||
*/
|
||||
public function getDoctorEvaluationList(): array
|
||||
{
|
||||
$doctor_id = $this->request->input('doctor_id');
|
||||
$page = $this->request->input('page', 1);
|
||||
$per_page = $this->request->input('per_page', 10);
|
||||
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $doctor_id;
|
||||
$params['status'] = 1; // 状态(0:禁用 1:正常 2:删除)
|
||||
$params["iden_auth_status"] = 1;// 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
$user_doctor = UserDoctor::getOne($params);
|
||||
if (empty($user_doctor)){
|
||||
return fail(HttpEnumCode::CLIENT_HTTP_ERROR);
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $doctor_id;
|
||||
$order_evaluation = OrderEvaluation::getPage($params);
|
||||
|
||||
if (!empty($order_evaluation['data'])){
|
||||
foreach ($order_evaluation['data'] as &$data){
|
||||
// 处理综合评分
|
||||
if ($data['avg_score'] != 0){
|
||||
$data['avg_score'] = ceil($data['avg_score'] * 0.05 * 100) / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success($order_evaluation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 医生详情简介-详情中的简介
|
||||
* @return array
|
||||
|
||||
Reference in New Issue
Block a user