src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -111,11 +111,15 @@ ) AS "has_children" FROM blade_dept dept WHERE dept.parent_id = #{param2} AND dept.is_deleted = 0 <if test="param1!=null and param1!=''"> and dept.tenant_id = #{param1} </if> <where> <if test="param2!=null and param2!=''"> and dept.parent_id = #{param2} </if> AND dept.is_deleted = 0 <if test="param1!=null and param1!=''"> and dept.tenant_id = #{param1} </if> </where> ORDER BY dept.sort </select>