From 4db2530d1bd178289b4f017967432caefb9435e6 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 18 四月 2024 14:46:44 +0800
Subject: [PATCH] 首页的日历任务+我的日程,资质明细

---
 cnas-server/src/main/resources/mapper/DepartmentMapper.xml |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cnas-server/src/main/resources/mapper/DepartmentMapper.xml b/cnas-server/src/main/resources/mapper/DepartmentMapper.xml
index 465bbc1..d29cd93 100644
--- a/cnas-server/src/main/resources/mapper/DepartmentMapper.xml
+++ b/cnas-server/src/main/resources/mapper/DepartmentMapper.xml
@@ -18,7 +18,10 @@
     </select>
     <select id="showUserById" resultType="com.yuanchu.mom.dto.UserDto">
         select * from (select id, name, age, email, phone,depart_id
-        from user where FIND_IN_SET( SUBSTRING_INDEX(depart_id, ',', -1) ,#{ids}) > 0 ) a
+        from user where state=1 and SUBSTRING_INDEX(depart_id, ',', -1) in
+        <foreach collection="ids" item="id" separator="," open="(" close=")">
+            #{id}
+        </foreach> ) a
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
@@ -34,6 +37,7 @@
                      JOIN DepartmentHierarchy dh ON d.father_id = dh.id
         )
         SELECT id
-        FROM DepartmentHierarchy;
+        FROM DepartmentHierarchy
+        order by id desc;
     </select>
 </mapper>

--
Gitblit v1.9.3