zhangnaisong
2024-07-30 6bce1b35246ed695a4272c24254c7073a524818a
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -46,7 +46,23 @@
      ${params.dataScope}
      order by d.parent_id, d.order_num
    </select>
   <select id="selectDeptListNoDataScope" parameterType="SysDept" resultMap="SysDeptResult">
      <include refid="selectDeptVo"/>
      where d.del_flag = '0'
      <if test="deptId != null and deptId != 0">
         AND dept_id = #{deptId}
      </if>
      <if test="parentId != null and parentId != 0">
         AND parent_id = #{parentId}
      </if>
      <if test="deptName != null and deptName != ''">
         AND dept_name like ('%${deptName}%')
      </if>
      <if test="status != null and status != ''">
         AND status = #{status}
      </if>
      order by d.parent_id, d.order_num
   </select>
    <select id="selectDeptListByRoleId" resultType="Long">
      select d.dept_id
      from sys_dept d