package com.gic.haoban.manage.service.service.chat;

import java.util.List;

import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.chat.GroupChatDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatOwnerDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatOwnerHistoryDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatSearchQDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO;
import com.gic.haoban.manage.service.pojo.bo.chat.GroupChatBO;

public interface GroupChatService {

    // 解散群
    public void dismissChat(String corpid, String wxChatId);

    // 创建群
    public void createChat(String corpid, String wxChatId);

    // 更新同步群信息
    public void updateChat(String corpid, String wxChatId, String updateDetail, String msg);

    public void initHaobaonGroupChat(String params);

    // 处理企微群事件
    public void handChatNotice(String params);

    // 定时初始化新建的群,获取代开发的群ID
    public void initGroupChatForTimer(String params);

    /**
     * 
    * @Title: refreshChatInfo
    * @Description: 重新刷新整个群
    * @author xugh
    * @param chatHmId
    * @throws
     */
    public void refreshChatInfo(Long groupChatId);

    /**
     * 
    * @Title: refreshChatStatus
    * @Description: 刷新群的状态
    * @author xugh
    * @param groupChatId
    * @throws
     */
    public void refreshChatStatus(Long groupChatId);

    /**
     * 
    * @Title: detail
    * @Description: 详情
    * @author xugh
    * @param wxEnterpriseId
    * @param groupChatId
    * @return
    * @throws
     */
    public GroupChatBO detail(String wxEnterpriseId, Long groupChatId);

    public GroupChatBO getByWxChatId(String wxEnterpriseId, String wxChatId);

    /**
     * 
    * @Title: listPage
    * @Description: 群列表
    * @author xugh
    * @param qdto
    * @param basePageInfo
    * @return
    * @throws
     */
    public Page<GroupChatDTO> listPage(GroupChatSearchQDTO qdto, BasePageInfo basePageInfo);

    public List<GroupChatBO> listChatByIdList(List<Long> idList);

    public void updateChatEnterpriseId(String wxEnterpriseId, String enterpriseId, List<Long> groupChatIdList);

    /**
     * 
    * @Title: listOwnerPage
    * @Description: 群主列表查询
    * @author xugh
    * @param qdto
    * @param basePageInfo
    * @return
    * @throws
     */
    public Page<GroupChatOwnerDTO> listOwnerPage(OwnerSearchQDTO qdto, BasePageInfo basePageInfo);

    public List<String> setDepartIdList(String wxEnterpriseId, String departmentId) ;


    /**
     * 
    * @Title: listOwnerHistory
    * @Description: 群主历史
    * @author xugh
    * @param groupChatId
    * @param WxEnterpriseId
    * @return
    * @throws
     */
    public List<GroupChatOwnerHistoryDTO> listOwnerHistory(Long groupChatId, String WxEnterpriseId);

    /**
     * 
    * @Title: transfer
    * @Description: 群继承
    * @author xugh
    * @param wxEnterpriseId
    * @param staffId
    * @param groupChatIdList
    * @return
    * @throws
     */
    public ServiceResponse<Void> transfer(String wxEnterpriseId, String staffId, List<Long> groupChatIdList);

    /**
     * 
    * @Title: matchMemberId
    * @Description: 加好友匹配客户
    * @author xugh
    * @param wxEnterpriseId
    * @param memberId
    * @param externalUserId
    * @throws
     */
    public void matchGicMember(String wxEnterpriseId, String enterpriseId, String memberId, String externalUserId);

    /**
     * 
    * @Title: handleHmChatFull
    * @Description: 定时轮询群满后的活码处理
    * @author xugh
    * @param params
    * @throws
     */
    public void handleHmChatFull(String params);

    public void ownerDimission(String staffId);

    /**
     * 
    * @Title: ownerDimission
    * @Description: 群主离职
    * @author xugh
    * @throws
     */
    public void ownerDimission();
    
    /**
     * 
    * @Title: initStaffGroupChat
    * @Description: 初始化单个成员的群
    * @author xugh
    * @param staffId
    * @return
    * @throws
     */
    public ServiceResponse<Void> initStaffGroupChat(String staffId) ;

}