package com.yd.dal.mapper.marketing;

import com.yd.dal.entity.marketing.MktLeadsAssigneds;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

public interface MktLeadsAssignedsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MktLeadsAssigneds record);

    int insertSelective(MktLeadsAssigneds record);

    MktLeadsAssigneds selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MktLeadsAssigneds record);

    int updateByPrimaryKey(MktLeadsAssigneds record);

    List<MktLeadsAssigneds> findByMktLeadsAssigneds(MktLeadsAssigneds mktLeadsAssigneds);

    List<MktLeadsAssigneds> findByPractitionerIdAndThisWeek(Long practitionerId);

    Integer countPractitionerIdsAndThisWeek(@Param("practitionerIds") List<Long> practitionerIds,@Param("refusedId") Long refusedId);

    HashMap<String, BigDecimal> performanceForecastForTeam(@Param("practitionerIds") List<Long> practitionerIds,@Param("refusedId") Long refusedId);

    List<MktLeadsAssigneds> selectByPractitionerIdRemoveRefused(@Param("practitionerIds")List<Long> practitionerIds,@Param("dropOptionsId") Long dropOptionsId);
}