bug
jiangqs
2023-08-17 b7c94458ce1c37cfc1b8797ebc38a9a03e305b1f
ruoyi-modules/ruoyi-system/src/main/resources/mapper/sys/SysDeptMapper.xml
@@ -21,10 +21,11 @@
      <result property="updateBy"   column="update_by"   />
      <result property="updateTime" column="update_time" />
      <result property="dataScope" column="data_scope" />
      <result property="wxDeptId" column="wx_dept_id" />
   </resultMap>
   
   <sql id="selectDeptVo">
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time ,d.data_scope
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time ,d.data_scope,d.wx_dept_id
        from sys_dept d
    </sql>
    
@@ -63,6 +64,11 @@
      <include refid="selectDeptVo"/>
      where dept_id = #{deptId}
   </select>
   <select id="getByWxDeptId" parameterType="Long" resultMap="SysDeptResult">
      <include refid="selectDeptVo"/>
      where wx_dept_id = #{wxDeptId}
   </select>
    
    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
      select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'