package com.erp.customer.service;

import com.erp.customer.dto.CustomerFollowUpRequest;
import com.erp.customer.entity.CustomerFollowUp;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 客户跟进记录Service接口
 */
public interface CustomerFollowUpService {
    
    /**
     * 分页查询跟进记录
     */
    List<CustomerFollowUp> listFollowUps(Long tenantId, Long customerId, String followType, 
                                          Long userId, String status, Integer page, Integer size);
    
    /**
     * 根据ID获取跟进记录
     */
    CustomerFollowUp getFollowUpById(Long id);
    
    /**
     * 创建跟进记录
     */
    CustomerFollowUp createFollowUp(CustomerFollowUpRequest request);
    
    /**
     * 更新跟进记录
     */
    CustomerFollowUp updateFollowUp(Long id, CustomerFollowUpRequest request);
    
    /**
     * 删除跟进记录
     */
    void deleteFollowUp(Long id);
    
    /**
     * 完成跟进记录
     */
    CustomerFollowUp completeFollowUp(Long id);
    
    /**
     * 取消跟进记录
     */
    CustomerFollowUp cancelFollowUp(Long id);
    
    /**
     * 获取客户的跟进记录
     */
    List<CustomerFollowUp> getFollowUpsByCustomerId(Long customerId, Integer limit);
    
    /**
     * 获取最近跟进记录
     */
    CustomerFollowUp getLatestFollowUp(Long customerId);
    
    /**
     * 获取待跟进列表
     */
    List<CustomerFollowUp> getPendingFollowUps(Long tenantId);
    
    /**
     * 获取今日待跟进
     */
    List<CustomerFollowUp> getTodayFollowUps(Long tenantId);
    
    /**
     * 统计客户跟进次数
     */
    Long countFollowUpsByCustomerId(Long customerId);
    
    /**
     * 统计跟进人员跟进次数
     */
    Long countFollowUpsByUserId(Long tenantId, Long userId);
    
    /**
     * 获取时间范围内的跟进记录
     */
    List<CustomerFollowUp> getFollowUpsByDateRange(Long tenantId, LocalDateTime startAt, LocalDateTime endAt);
}
