package com.gic.haoban.manage.api.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.ChatEventDTO;
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.chat.GroupChatUserDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatSearchQDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatUserSearchQDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO;

public interface GroupChatApiService {

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

    /**
     * 
    * @Title: listUserPage
    * @Description: 群成员列表查询
    * @author xugh
    * @param qdto
    * @param basePageInfo
    * @return
    * @throws
     */
    public ServiceResponse<Page<GroupChatUserDTO>> listUserPage(GroupChatUserSearchQDTO qdto,
            BasePageInfo basePageInfo);

    /**
     * 
    * @Title: detail
    * @Description: 群详情
    * @author xugh
    * @param wxEnterpriseId
    * @param groupChatId
    * @return
    * @throws
     */
    public ServiceResponse<GroupChatDTO> detail(String wxEnterpriseId, Long groupChatId);

    /**
     * 
    * @Title: refreshChatInfo
    * @Description: 刷新群
    * @author xugh
    * @param groupChatId
    * @return
    * @throws
     */
    public ServiceResponse<Void> refreshChatInfoFromMQ(String params);

    
    /**
     * 
    * @Title: refreshChatStatus
    * @Description: 刷新群的状态
    * @author xugh
    * @param params
    * @return
    * @throws
     */
    public ServiceResponse<Void> refreshChatStatusFromMQ(String params) ;
    
    /**
     * 
    * @Title: updateChatEnterpriseId
    * @Description: 客户群认领,更新企业ID
    * @author xugh
    * @param wxEnterpriseId
    * @param enterpriseId
    * @param groupChatIdList
    * @return
    * @throws
     */
    public ServiceResponse<Void> updateChatEnterpriseId(String wxEnterpriseId, String enterpriseId,
            List<Long> groupChatIdList);

    /**
     * 
    * @Title: qwEventNotice
    * @Description: 企微事件通知
    * @author xugh
    * @param dto
    * @throws
     */
    public ServiceResponse<Void> qwEventNotice(ChatEventDTO dto);

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

    /**
     * 
    * @Title: listOwnerHistory
    * @Description: 历史群主
    * @author xugh
    * @param groupChatId
    * @param WxEnterpriseId
    * @return
    * @throws
     */
    public ServiceResponse<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: getSetFlag
    * @Description: 
    * @author xugh
    * @param wxEnterpriseId
    * @return
    * @throws
     */
    public ServiceResponse<Boolean> getSetGicFlag(String wxEnterpriseId);

    /**
     * 
    * @Title: listChatByIdList
    * @Description: 通过id列表查询
    * @author xugh
    * @param wxEnterpriseId
    * @param groupChatIdList
    * @return
    * @throws
     */
    public ServiceResponse<List<GroupChatDTO>> listChatByIdList(String wxEnterpriseId, List<Long> groupChatIdList);


    public ServiceResponse<GroupChatDTO> getByWxChatId(String wxEnterpriseId, String wxChatId);

    public GroupChatUserDTO getGroupUserInfo(Long groupChatId , String externalUserId) ;



}
