package com.huimv.apiservice.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huimv.apiservice.entity.EmployeeEntity;
import com.huimv.apiservice.entity.YearPigBaseEntity;
import com.huimv.apiservice.entity.vo.PigBaseVo;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 数据访问层
 *
 * @author yinhao
 * @date 2021/5/8 17:22
 */
@Mapper
@Repository
public interface PigDao extends BaseMapper<YearPigBaseEntity> {

    EmployeeEntity selectFeederInfoByPigEarTagNo(String pigEarTagNo);

    String selectPastureNameByPigstyId(Integer pigstyId);

    IPage<PigBaseVo> selectPagePigBaseVoByBreedName(IPage<PigBaseVo> page, @Param("breedName") String breedName, @Param("periodId") Integer periodId);

    boolean selectHealthStatus(String pigEarTagNo);

    void batchInsertData(List<YearPigBaseEntity> list);
}
