package com.ym.mec.biz.dal.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ym.mec.biz.dal.dto.ImGroupMemberDto;
import com.ym.mec.biz.dal.entity.ImGroup;
import com.ym.mec.common.dal.BaseDAO;

public interface ImGroupDao extends BaseDAO<Long, ImGroup> {

	ImGroup getLocked(Long imGroupId);

	/**
	 * 查询用户所在的群列表
	 * @param userId
	 * @param search
	 * @return
	 */
	List<ImGroup> queryByUserId(@Param("userId") Integer userId, @Param("search") String search);

	/**
	 * 查询群成员列表
	 * @param imGroupId
	 * @return
	 */
	List<ImGroupMemberDto> queryMemberById(Long imGroupId);

	ImGroupMemberDto queryMember(@Param("imGroupId") Long imGroupId, @Param("userId") Integer userId);
}