fuliqi
2024-07-22 6039b5f7fa82870ceb4c3173c8fa0721f5cee7bd
ycl-server/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -30,7 +30,7 @@
   <select id="selectDeptList" parameterType="com.ycl.system.entity.SysDept" resultMap="SysDeptResult">
        <include refid="selectDeptVo"/>
        where d.del_flag = '0'
        where d.del_flag = 0
      <if test="deptId != null and deptId != 0">
         AND dept_id = #{deptId}
      </if>
@@ -67,12 +67,12 @@
   </select>
    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
      select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
      select count(1) from sys_user where dept_id = #{deptId} and del_flag = 0
   </select>
   <select id="hasChildByDeptId" parameterType="Long" resultType="int">
      select count(1) from sys_dept
      where del_flag = '0' and parent_id = #{deptId} limit 1
      where del_flag = 0 and parent_id = #{deptId} limit 1
   </select>
   <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
@@ -80,12 +80,12 @@
   </select>
   <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
      select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
      select count(*) from sys_dept where status = '0' and del_flag = 0 and find_in_set(#{deptId}, ancestors)
   </select>
   <select id="checkDeptNameUnique" resultMap="SysDeptResult">
       <include refid="selectDeptVo"/>
      where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
      where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = 0 limit 1
   </select>
    <insert id="insertDept" parameterType="com.ycl.system.entity.SysDept">
@@ -159,7 +159,7 @@
   </delete>
   <select id="cascader" resultType="com.ycl.platform.base.Cascader">
      SELECT dept_id as value, dept_name as label, parent_id as parentId FROM sys_dept WHERE status = '0' AND del_flag = '0'
      SELECT dept_id as value, dept_name as label, parent_id as parentId FROM sys_dept WHERE status = '0' AND del_flag = 0
   </select>
   <select id="selectParents" resultType="long">