package com.yd.dal.service.marketing.Impl;

import com.yd.dal.entity.marketing.MktLeadsGoalsActions;
import com.yd.dal.mapper.marketing.MktLeadsGoalsActionsMapper;
import com.yd.dal.service.marketing.MktLeadsGoalsActionsDALService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("mktLeadsGoalsActionsService")
public class MktLeadsGoalsActionsDALServiceImpl implements MktLeadsGoalsActionsDALService {

    @Resource
    private MktLeadsGoalsActionsMapper mktLeadsGoalsActionsMapper;

    @Override
    public void save(MktLeadsGoalsActions mktLeadsGoalsActions) {
        mktLeadsGoalsActionsMapper.insertSelective(mktLeadsGoalsActions);
    }

    @Override
    public void updateIsActiveIsNull(Long practitionerId, int year,Integer goalsType) {
        mktLeadsGoalsActionsMapper.updateIsActiveIsNull(practitionerId, year,goalsType);
    }

    @Override
    public List<MktLeadsGoalsActions> findByMktLeadsGoalsActions(MktLeadsGoalsActions mktLeadsGoalsActions) {
        return mktLeadsGoalsActionsMapper.findByMktLeadsGoalsActions(mktLeadsGoalsActions);
    }

    @Override
    public List<MktLeadsGoalsActions> findTeamGoalsMonth(Long practitionerId, int year) {
        return mktLeadsGoalsActionsMapper.findTeamGoalsMonth(practitionerId, year);
    }
}
