From 8aa996cea657fccd8b477881688c08e20d6cd1fc Mon Sep 17 00:00:00 2001 From: liqi Date: Mon, 6 Jan 2025 15:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/modules/v1/controllers/PatientController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/modules/v1/controllers/PatientController.php b/service/modules/v1/controllers/PatientController.php index e549683..df5e138 100644 --- a/service/modules/v1/controllers/PatientController.php +++ b/service/modules/v1/controllers/PatientController.php @@ -430,7 +430,9 @@ class PatientController extends BaseServiceController 'r.is_delete' => 0, 'r.is_pay' => 1, 'r.is_cancel' => 0, - ])->andWhere(['r.user_patient_id' => $subQuery])->orderBy(['created_at' => SORT_DESC]) + ])->andWhere(['r.user_patient_id' => $subQuery]) + ->andWhere(['r.created_at' => $subQuery->select('max_created_at')]) + ->orderBy(['created_at' => SORT_DESC]) ->with(['patient']); break; case 2: