<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.im.mapper.GroupMapper">

    <select id="groupExist"  resultType="Long">
        SELECT a.group_id  from
                     im_group_member a,
                     im_group_member b,
                     im_group_member c
                 WHERE a.group_id=b.group_id
                   and b.group_id=c.group_id
                   and a.user_id=#{userId}
                   and b.user_id=#{customer}
                   and c.user_id=#{instructor}
    </select>


</mapper>
