mitao
2 天以前 6bdff06fadea15ab3b4e70c25a7cb4c73e5a64fc
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -87,6 +87,21 @@
      where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
   </select>
    
    <select id="selectByIds" resultType="com.ruoyi.common.core.domain.entity.SysDept"
            parameterType="java.util.List">
      select * from sys_dept
      <where>
         del_flag = '0'
         <if test="deptIds !=null and deptIds.size() != 0">
            and dept_id in
            <foreach collection="deptIds" item="item" open="(" separator="," close=")">
               #{item}
            </foreach>
         </if>
      </where>
      order by id desc
   </select>
    <insert id="insertDept" parameterType="SysDept">
       insert into sys_dept(
          <if test="deptId != null and deptId != 0">dept_id,</if>