From 7aad06fedc12f0183734088fa44c929ac6ff42b3 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期六, 10 十月 2026 11:54:01 +0800
Subject: [PATCH] feat: 增加多个查询的排序功能以优化数据检索

---
 src/main/resources/mapper/staff/StaffOnJobMapper.xml |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/staff/StaffOnJobMapper.xml b/src/main/resources/mapper/staff/StaffOnJobMapper.xml
index fe35886..a6b8c4d 100644
--- a/src/main/resources/mapper/staff/StaffOnJobMapper.xml
+++ b/src/main/resources/mapper/staff/StaffOnJobMapper.xml
@@ -24,6 +24,7 @@
         <if test="staffOnJob.entryDateEnd != null and staffOnJob.entryDateEnd != '' ">
             AND contract_expire_time &lt;= DATE_FORMAT(#{staffOnJob.entryDateEnd},'%Y-%m-%d')
         </if>
+        ORDER BY staff_on_job.sign_date DESC, staff_on_job.id DESC
     </select>
     <select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto">
         SELECT

--
Gitblit v1.9.3