Browse Source

部门树修改

gao.qiang 1 day ago
parent
commit
e80b35f2da
1 changed files with 17 additions and 0 deletions
  1. 17 0
      base-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 17 - 0
base-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -41,6 +41,23 @@
         <if test="deptName != null and deptName != ''">
             AND dept_name like concat('%', #{deptName}, '%')
         </if>
+        <if test="!dsFlay">
+            and
+            <trim prefix="(" prefixOverrides="or" suffix=")">
+                <if test="dsUserId != null and dsUserId != ''">
+                    or d.create_by=#{dsUserId}
+                </if>
+                <if test="dsDeptId != null and dsDeptId != 0">
+                    or d.dept_id=#{dsDeptId}
+                </if>
+                <if test="dsDeptIds != null">
+                    or d.dept_id in
+                    <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index="">
+                        #{item}
+                    </foreach>
+                </if>
+            </trim>
+        </if>
         order by d.parent_id, d.order_num
     </select>