From 820e9e9e5e4ce7e8fb477ae8f2573dab1f2074de Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 27 五月 2026 11:47:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro

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

diff --git a/src/main/resources/mapper/staff/StaffOnJobMapper.xml b/src/main/resources/mapper/staff/StaffOnJobMapper.xml
index 2cbd1dc..90825e3 100644
--- a/src/main/resources/mapper/staff/StaffOnJobMapper.xml
+++ b/src/main/resources/mapper/staff/StaffOnJobMapper.xml
@@ -79,6 +79,7 @@
         <if test="staffOnJob.contractStartTime != null">
             HAVING MIN(t1.contract_start_time) = #{staffOnJob.contractStartTime}
         </if>
+        order by staff_on_job.create_time desc
     </select>
     <select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto">
         SELECT
@@ -90,13 +91,15 @@
         sys_post sp ON sp.post_id = staff_on_job.sys_post_id
         LEFT JOIN
         sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id
-        where 1=1
-        <if test="staffOnJob.staffState != null">
-            AND staff_state = #{staffOnJob.staffState}
-        </if>
-        <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' ">
-            AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%')
-        </if>
+        <where>
+            <if test="staffOnJob.staffState != null">
+                AND staff_state = #{staffOnJob.staffState}
+            </if>
+            <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' ">
+                AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%')
+            </if>
+        </where>
+        order by staff_on_job.create_time desc
     </select>
     <!-- 缁熻鎸囧畾鏃ユ湡鐨勫湪鑱屽憳宸ユ暟 -->
     <select id="countOnJobStaffByDate" resultType="java.lang.Integer">

--
Gitblit v1.9.3