package com.kiisoo.ic.generalize.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kiisoo.ic.analysis.bean.TableAnalysisDTO;
import com.kiisoo.ic.generalize.entity.PoiCustomerContactDataStat;
import com.kiisoo.ic.store.entity.StorePromotionDataDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;

@Repository
public interface PoiCustomerContactDataStatMapper extends BaseMapper<PoiCustomerContactDataStat> {
    /**
     * 拉黑客户list
     */
    List<PoiCustomerContactDataStat> selectDeleteCustomer(@Param("shopIds")List<Long> shopIds);

    BigDecimal selectSumAddCustomer(@Param("shopIds")List<Long> storeIds,@Param("startDate") Date selectStartTime, @Param("endDate")Date selectEndTime);

    List<TableAnalysisDTO> selectSumApplyCustomer(@Param("shopIds")List<Long> storeIds, @Param("count")Integer count,
                                            @Param("startDate") Date selectStartTime, @Param("endDate")Date selectEndTime);

    /**
     * 拉黑数统计
     * @param storeIds 店铺ID集合
     * @return 返回拉黑总数
     * @author dexiang.jiang
     * @date 2020/05/17 12:42
     */
    Integer sumNegativeFeedbackCntByStoreIds(@Param("storeIds") List<Long> storeIds);

    List<PoiCustomerContactDataStat> selectSumDataByShopIds(@Param("storeIds") Set<Long> storeIds, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
}
