From 98dce0b733be283767c17b62ce7ff312aacd9f5d Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 24 六月 2026 13:25:48 +0800
Subject: [PATCH] 已领用并且被销售模块引用的公海客户不能回收或者编辑操作,已被销售模块引用的私海客户也不能编辑操作

---
 src/main/resources/mapper/staff/StaffLeaveMapper.xml |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/staff/StaffLeaveMapper.xml b/src/main/resources/mapper/staff/StaffLeaveMapper.xml
index 8bc9607..fef5c81 100644
--- a/src/main/resources/mapper/staff/StaffLeaveMapper.xml
+++ b/src/main/resources/mapper/staff/StaffLeaveMapper.xml
@@ -35,6 +35,7 @@
         <if test="c.staffName != null and c.staffName != '' ">
             AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
         </if>
+        order by staff_leave.create_time desc
     </select>
     <select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto">
         SELECT
@@ -61,10 +62,12 @@
         sys_post sp ON sp.post_id = soj.sys_post_id
         LEFT JOIN
         sys_dept sd ON sd.dept_id = soj.sys_dept_id
-        where 1=1
-        <if test="c.staffName != null and c.staffName != '' ">
-            AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
-        </if>
+        <where>
+            <if test="c.staffName != null and c.staffName != '' ">
+                AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
+            </if>
+        </where>
+        order by staff_leave.create_time desc
     </select>
 
     <select id="staffLeaveReasonAnalytics" resultType="com.ruoyi.staff.dto.StaffLeaveDto">

--
Gitblit v1.9.3