package com.yonge.cooleshow.biz.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yonge.cooleshow.biz.dal.entity.ImNetworkRoomMember;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 网络教室成员(ImNetworkRoomMember)表数据库访问层
 *
 * @author zx
 * @since 2022-03-30 16:36:37
 */
public interface ImNetworkRoomMemberDao extends BaseMapper<ImNetworkRoomMember> {

    int insertBatch(@Param("entities") List<ImNetworkRoomMember> entities);

    int insert(@Param("entity") ImNetworkRoomMember roomMember);

    ImNetworkRoomMember findByRidAndUid(@Param("roomId") String roomId, @Param("userId") Long userId);

    List<ImNetworkRoomMember> queryByRoomId(@Param("roomId") String roomId);

    void delByRidAndUid(@Param("roomId") String roomId, @Param("userId") Long userId);

    int countByRoomId(@Param("roomId") String roomId);

    List<ImNetworkRoomMember> findByRoomAndRole(@Param("roomId") String roomId, @Param("role") int role);
}

