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

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.MassGroupTaskData;
import com.gic.haoban.manage.api.dto.chat.ChatOwnerTotalDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanLogDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatPlanSearchQDTO;
import com.gic.haoban.manage.api.qdto.StaffSendResultQDTO;

import java.util.Date;

/**
 * 
* @ClassName: GroupChatPlanApiService
* @Description: 群群发
* @author xugh
* @date 2022年12月1日 下午10:58:07
*
 */
public interface GroupChatPlanApiService {

    // 群发列表
    public ServiceResponse<Page<GroupChatPlanDTO>> listPage(GroupChatPlanSearchQDTO qdto, BasePageInfo basePageInfo);

    // 群发详情
    public ServiceResponse<GroupChatPlanDTO> detail(Long planId);

    // 保存/更新
    public ServiceResponse<GroupChatPlanDTO> save(GroupChatPlanDTO dto);
    
    // 更新备注
    public ServiceResponse<GroupChatPlanDTO> updateRemark(GroupChatPlanDTO dto);
    
    public ServiceResponse<GroupChatPlanOwnerLogDTO> getOwnerInfo(Long planId ,String staffId , String clerkId , String wxEnterpriseId);

    /**
     * 
    * @Title: doPlanTimer
    * @Description: 定时执行计划
    * @author xugh
    * @param params
    * @return
    * @throws
     */
    public ServiceResponse<Void> doPlanTimer(String params);
    
    public ServiceResponse<Void> doPlanSendInfoTimer(String params) ;
    
    public ServiceResponse<Void> reflushSendInfo(Long ownerLogId) ;
    
    public ServiceResponse<GroupChatPlanOwnerLogDTO> getOwnerSendInfo(Long ownerLogId) ;

    public ServiceResponse<Page<GroupChatPlanOwnerLogDTO>> listOwnerLogPage(Long planId, GroupChatPlanSearchQDTO qdto,
            BasePageInfo basePageInfo);

    public ServiceResponse<Page<GroupChatPlanOwnerLogDTO>> listOwnerLogPageForWxa(GroupChatPlanSearchQDTO qdto,
            BasePageInfo basePageInfo);

    public ServiceResponse<Page<ChatOwnerTotalDTO>> listOwnerLogPageForWxaTotal(GroupChatPlanSearchQDTO qdto,
            BasePageInfo basePageInfo);

    public ServiceResponse<Page<GroupChatPlanLogDTO>> listLogPage(Long planId, GroupChatPlanSearchQDTO qdto,
            BasePageInfo basePageInfo);

    public ServiceResponse<Void> del(String clerkId, String clerkName, Long planId);

    public ServiceResponse<Void> stop(String clerkId, String clerkName, Long planId);

    /**
     * 查询社群群发待发送总数
     * @param enterpriseId gic企业id
     * @param clerkId 导购id
     * @param storeId 门店id
     * @return
     */
    public ServiceResponse<Integer> getTotalCount(String enterpriseId,String clerkId,String storeId);

    void staffSendResult(StaffSendResultQDTO qdto);

    /**
     * 获取msgid(非社群群发)
     * @return
     */
    String getQwMsgId(String staffId , Date sendTime) ;


    /**
     *
     * @param params
     */
    void noticeTimer(String params) ;

    MassGroupTaskData massMomentTaskData(String enterpriseId , String clerkId , Date date) ;

    MassGroupTaskData massGroupTaskData(String enterpriseId , String clerkId , Date date) ;

    Integer getTaskNum(String wxEnterpriseId, String enterpriseId, String storeId, String clerkId, String staffId);

}
