陈昶聿
5 天以前 6d52b8631cc608d5c4be5c738939c3a466d411fd
ruoyi-system/src/main/resources/mapper/system/SysUserDeptMapper.xml
@@ -82,6 +82,17 @@
        where id = #{id}
    </select>
    <select id="selectSysUserDeptByUserAndCode" resultMap="SysUserDeptResult">
        <include refid="selectSysUserDeptVo"/>
        where user_id = #{userId}
          and dept_code = #{deptCode}
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
        order by del_flag asc, id asc
        limit 1
    </select>
    <insert id="insertSysUserDept" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept"
            useGeneratedKeys="true" keyProperty="id">
        insert into sys_user_dept