package com.yd.dal.service.customer.impl;

import com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds;
import com.yd.dal.mapper.customer.AclPractitionerPotentialAssignedsMapper;
import com.yd.dal.service.customer.AclPractitionerPotentialAssignedsDALService;
import org.springframework.stereotype.Service;

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

@Service("aclPractitionerPotentialAssignedsDALService")
public class AclPractitionerPotentialAssignedsDALServiceImpl implements AclPractitionerPotentialAssignedsDALService {

    @Resource
    private AclPractitionerPotentialAssignedsMapper aclPractitionerPotentialAssignedsMapper;
    @Override
    public void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList) {
        aclPractitionerPotentialAssignedsMapper.insertList(potentialAssignedsList);
    }

    @Override
    public List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(Long potentialId, Long practitionerId) {
        return aclPractitionerPotentialAssignedsMapper.findByPotentialIdAndPractitionerId(potentialId,practitionerId);
    }

    @Override
    public void update(AclPractitionerPotentialAssigneds assigneds) {
        aclPractitionerPotentialAssignedsMapper.updateByPrimaryKeySelective(assigneds);
    }

    @Override
    public List<AclPractitionerPotentialAssigneds> findByPractitionerId(Long practitionerId) {
        return aclPractitionerPotentialAssignedsMapper.findByPractitionerId(practitionerId);
    }

    @Override
    public List<AclPractitionerPotentialAssigneds> findByPractitionerIdAndPotentialIdList(Long practitionerId, List<Long> potentialIdList) {
        return aclPractitionerPotentialAssignedsMapper.findByPractitionerIdAndPotentialIdList(practitionerId,potentialIdList);
    }
}
