package com.huimv.management.dao;

import com.huimv.management.entity.PigstyEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 猪舍表
 * 
 * @author yinhao
 * @email yinhao@163.com
 * @date 2021-05-07 15:32:42
 */
@Mapper
@Repository
public interface PigstyDao extends BaseMapper<PigstyEntity> {

    @Select("SELECT id FROM mgt_pigsty WHERE number like CONCAT('%',#{pigstyName},'%') AND deleted = 0")
    List<Integer> selectIdListByPigstyName(@Param("pigstyName") String pigstyName);
}
