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

import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO;
import com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerStaticsBO;
import com.gic.haoban.manage.service.pojo.qo.content.InteractRecordQO;

import java.util.List;

/**
 * 互动记录明细(TabHaobanInteractRecord)表服务接口
 *
 * @author makejava
 * @since 2023-03-28 10:32:48
 */
public interface InteractRecordService {

    /**
     * 查询互动记录
     * @param enterpriseId
     * @param traceId
     * @return
     */
    InteractRecordBO queryWithInteractInfo(String enterpriseId, String traceId);

    /**
     * 互动记录查询
     * @param interactRecordQO
     * @return
     */
    Page<InteractRecordBO> queryInteractRecordPage(InteractRecordQO interactRecordQO);

    /**
     * 统计总数
     * @param interactRecordQO
     * @return
     */
    Integer countInteractRecord(InteractRecordQO interactRecordQO);

    /**
     * 保存互动记录
     * @param interactRecordBO
     * @return
     */
    Long saveOrUpdateInteractRecord(InteractRecordBO interactRecordBO);

    /**
     * 统计导购的互动记录总数
     * @param interactRecordQO
     * @return
     */
    List<PotentialCustomerStaticsBO> staticsClerkNewInteractRecord(InteractRecordQO interactRecordQO);

    /**
     * 会员合并操作
     * @param mergeMemberId
     * @param memberId
     */
    void mergeMember(String mergeMemberId, String memberId);

    /**
     * 会员授权事件
     * @param memberId
     * @param unionId
     */
    void memberAuthorized(String memberId, String unionId);

    /**
     * 查询最新的一条互动记录
     * @param clerkId
     * @param materialId
     * @param memberId
     * @return
     */
    InteractRecordBO queryLeastRecord(String enterpriseId, String clerkId, String materialId, String memberId);

}
