package com.yd.dal.mapper.marketing;

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

import java.util.List;

public interface MktLeadsGoalsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MktLeadsGoals record);

    int insertSelective(MktLeadsGoals record);

    MktLeadsGoals selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MktLeadsGoals record);

    int updateByPrimaryKey(MktLeadsGoals record);

    void updateIsActiveIsNull(@Param("practitionerId") Long practitionerId, @Param("year") Integer year, @Param("goalsType") Integer goalsType);

    List<MktLeadsGoals> selectByMktLeadsGoals(MktLeadsGoals mktLeadsGoals);

    List<MktLeadsGoals> selectByPractitionerIds(@Param("practitionerIds") List<Long> practitionerIds,@Param("year") Integer year);

    List<MktLeadsGoals> findByTypeAndTimeUnitAndSubordinateSystemId(@Param("goalsType") Integer goalsType, @Param("statisticTimeUnit")Integer statisticTimeUnit, @Param("subordinateSystemId")Long subordinateSystemId);

    List<MktLeadsGoals> findByTypeAndTimeUnitAndPractitionerId(@Param("goalsType")Integer goalsType, @Param("statisticTimeUnit")Integer statisticTimeUnit, @Param("practitionerId")Long practitionerId);
}