xiangpei
2025-02-25 c2c9e3b1039c0a5223801759475112c6da9a3a3d
system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -47,6 +47,18 @@
      order by d.parent_id, d.order_num
    </select>
   <select id="selectDeptListNoAuth" parameterType="SysDept" resultMap="SysDeptResult">
      <include refid="selectDeptVo"/>
      where d.del_flag = '0'
      <if test="parentId != null">
         AND FIND_IN_SET(#{parentId}, ancestors) > 0
      </if>
      <if test="deptName != null and deptName != ''">
         AND dept_name like concat('%', #{deptName}, '%')
      </if>
      order by d.parent_id, d.order_num
   </select>
    <select id="selectDeptListByRoleId" resultType="Long">
      select d.dept_id
      from sys_dept d