package com.zhyc.module.base.service.impl;

import java.util.List;

import com.zhyc.module.base.domain.BasSheepVariety;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhyc.module.base.mapper.BasSheepVarietyMapper;
import com.zhyc.module.base.service.IBasSheepVarietyService;

/**
 * 羊只品种Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-15
 */
@Service
public class BasSheepVarietyServiceImpl implements IBasSheepVarietyService 
{
    @Autowired
    private BasSheepVarietyMapper basSheepVarietyMapper;

    /**
     * 查询羊只品种
     * 
     * @param id 羊只品种主键
     * @return 羊只品种
     */
    @Override
    public BasSheepVariety selectBasSheepVarietyById(Long id)
    {
        return basSheepVarietyMapper.selectBasSheepVarietyById(id);
    }

    /**
     * 查询羊只品种列表
     * 
     * @param basSheepVariety 羊只品种
     * @return 羊只品种
     */
    @Override
    public List<BasSheepVariety> selectBasSheepVarietyList(BasSheepVariety basSheepVariety)
    {
        return basSheepVarietyMapper.selectBasSheepVarietyList(basSheepVariety);
    }

    /**
     * 新增羊只品种
     * 
     * @param basSheepVariety 羊只品种
     * @return 结果
     */
    @Override
    public int insertBasSheepVariety(BasSheepVariety basSheepVariety)
    {
        return basSheepVarietyMapper.insertBasSheepVariety(basSheepVariety);
    }

    /**
     * 修改羊只品种
     * 
     * @param basSheepVariety 羊只品种
     * @return 结果
     */
    @Override
    public int updateBasSheepVariety(BasSheepVariety basSheepVariety)
    {
        return basSheepVarietyMapper.updateBasSheepVariety(basSheepVariety);
    }

    /**
     * 批量删除羊只品种
     * 
     * @param ids 需要删除的羊只品种主键
     * @return 结果
     */
    @Override
    public int deleteBasSheepVarietyByIds(Long[] ids)
    {
        return basSheepVarietyMapper.deleteBasSheepVarietyByIds(ids);
    }

    /**
     * 删除羊只品种信息
     * 
     * @param id 羊只品种主键
     * @return 结果
     */
    @Override
    public int deleteBasSheepVarietyById(Long id)
    {
        return basSheepVarietyMapper.deleteBasSheepVarietyById(id);
    }

    @Override
    public BasSheepVariety selectByVarietyName(String varietyName) {
        return basSheepVarietyMapper.selectByVarietyName(varietyName);
    }
}
