diff --git a/app/Services/DoctorAuthService.php b/app/Services/DoctorAuthService.php index cb6ee3a..fccce8f 100644 --- a/app/Services/DoctorAuthService.php +++ b/app/Services/DoctorAuthService.php @@ -447,6 +447,39 @@ class DoctorAuthService extends BaseService $expertise_is_change = true; } + // 验证认证失败场景 + if ($doctor['iden_auth_status'] == 3){ + // 获取认证失败字段 + $params = array(); + $params['doctor_id'] = $user_info['client_user_id']; + $doctor_iden_fails = DoctorIdenFail::getList($params); + if (!empty($doctor_iden_fails)){ + foreach ($doctor_iden_fails as $doctor_iden_fail){ + // 科室电话 + if ($doctor_iden_fail['field_name'] == "department_custom_mobile") { + if ($doctor['department_custom_mobile'] == $request_params['department_custom_mobile']){ + return fail(HttpEnumCode::HTTP_ERROR,"科室电话" . $doctor_iden_fail['fail_reason']); + } + } + + // 医生简介 + if ($doctor_iden_fail['field_name'] == "brief_introduction") { + if ($doctor['brief_introduction'] == $request_params['brief_introduction']){ + return fail(HttpEnumCode::HTTP_ERROR,"医生简介" . $doctor_iden_fail['fail_reason']); + } + } + + // 擅长领域 + if ($doctor_iden_fail['field_name'] == "be_good_at") { + if ($doctor['be_good_at'] == $request_params['be_good_at']){ + return fail(HttpEnumCode::HTTP_ERROR,"擅长领域" . $doctor_iden_fail['fail_reason']); + } + } + } + } + + } + Db::beginTransaction(); try { // 专长有改动