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

import java.util.List;
import java.util.Map;

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.GroupChatHmDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatHmMemberRelationDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.ChatHmSearchQDTO;
import com.gic.haoban.manage.service.pojo.bo.chat.GroupChatHmBO;

public interface GroupChatHmService {

    /**
     * 
    * @Title: saveHm
    * @Description: 新增/更新群活码
    * @author xugh
    * @param dto
    * @return
    * @throws
     */
    public ServiceResponse<GroupChatHmDTO> saveHm(GroupChatHmDTO dto);

    GroupChatHmBO getById(Long hmId);

    public Page<GroupChatHmBO> listPage(ChatHmSearchQDTO qdto, BasePageInfo basePageInfo);

    /**
     * 
    * @Title: handleChatOff
    * @Description: 群下线后活码处理
    * @author xugh
    * @param groupChat
    * @throws
     */
    public void handleChatOff(String wxEnterpriseId, Long groupChat);

    public void discard(Long chatHmId, String wxEnterpriseId, String clerkId, String clerkName);

    public void updateLinkCount(String wxEnterpriseId , List<Long> chatHmIdList); 
    
    /**
     * 
     * @Title: listHmGroupChatId
     * @Description: 查询活码下的群id列表
     * @author xgh331 
     * @param wxEnterpriseId
     * @param chatHmId
     * @return
     * @throws
     */
    public List<Long> listHmGroupChatId(String wxEnterpriseId, Long chatHmId) ;

    /**
     * 通过会员查询群活码列表（仅展示名称包含骑行的群活码）
     * @param enterpriseId
     * @param memberId
     * @param basePageInfo
     * @return
     */
    Page<GroupChatHmMemberRelationDTO> memberGroupChatHmPage(String enterpriseId, String memberId, BasePageInfo basePageInfo);

    Integer memberJoinGroupChatHmCount(String enterpriseId, String memberId);

    /**
     * 活码包含的群主有多个门店
     * @param wxEnterpriseId
     * @return
     */
    Map<Long,Boolean> hasManyOwnerStore(String wxEnterpriseId, List<Long> chatHmIdList);
}