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

import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.dao.ImGroupDao;
import com.yonge.cooleshow.biz.dal.dto.ImGroupResultDto;
import com.yonge.cooleshow.biz.dal.dto.ImGroupSearchDto;
import com.yonge.cooleshow.biz.dal.entity.ImGroup;

import java.util.List;

/**
 * 即时通讯群组(ImGroup)表服务接口
 *
 * @author zx
 * @since 2022-03-22 10:45:57
 */
public interface ImGroupService extends IService<ImGroup> {

    ImGroupDao getDao();

    /**
    * @description: 用户主动创建群聊
     * @param imGroup
    * @author zx
    * @date 2022/3/22 11:17
    */
    void create(ImGroup imGroup) throws Exception;

    /**
    * @description: 成课后自动创建群聊，建议放在最后执行
     * @param courseGroupId 课程组编号
     * @param courseGroupType 课程组类型
    * @author zx
    * @date 2022/3/22 11:17
    */
    void autoCreate(Long courseGroupId,String courseGroupType) throws Exception;

    /**
    * @description: 关闭群聊、解散
     * @param groupId
    * @author zx
    * @date 2022/3/22 11:17
    */
    void dismiss(String groupId) throws Exception;

    /**
    * @description: 同步群成员数量
     * @param groupId
    * @author zx
    * @date 2022/3/22 11:17
    */
    void syncGroupMemberNum(String groupId) throws Exception;

    /**
    * @description: 获取群列表
     * @param imGroupSearchDto
    * @return java.util.List<com.yonge.cooleshow.biz.dal.entity.ImGroup>
    * @author zx
    * @date 2022/4/27 10:23
    */
    List<ImGroup> queryAll(ImGroupSearchDto imGroupSearchDto);

    /**
    * @description: 获取指定用户创建的群聊
     * @param imGroupSearchDto
    * @return java.util.List<com.yonge.cooleshow.biz.dal.entity.ImGroupResultDto>
    * @author zx
    * @date 2022/4/27 10:56
    */
    List<ImGroupResultDto> queryTeacherFun(ImGroupSearchDto imGroupSearchDto);
}

