request->post('doctor_id') ?: $this->request->post('doctorId')); $patientId = trim((string) ($this->request->post('patient_id') ?: $this->request->post('patientId') ?: '')); $patientName = trim((string) ($this->request->post('patient_name') ?: $this->request->post('patientName') ?: '患者')); if ($doctorId <= 0) { return $this->fail('医生ID无效'); } ChatNotifyLogic::addNotify($doctorId, $patientId ?: '0', $patientName); return $this->success('已通知'); } }