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

import java.util.List;

import com.zhyc.module.biosafety.domain.SwMedicine;
import com.zhyc.module.biosafety.mapper.SwMedicineMapper;
import com.zhyc.module.biosafety.service.ISwMedicineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 药品Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class SwMedicineServiceImpl implements ISwMedicineService
{
    @Autowired
    private SwMedicineMapper swMedicineMapper;

    /**
     * 查询药品
     * 
     * @param id 药品主键
     * @return 药品
     */
    @Override
    public SwMedicine selectSwMedicineById(Long id)
    {
        return swMedicineMapper.selectSwMedicineById(id);
    }

    /**
     * 查询药品列表
     * 
     * @param swMedicine 药品
     * @return 药品
     */
    @Override
    public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine)
    {
        return swMedicineMapper.selectSwMedicineList(swMedicine);
    }

    /**
     * 新增药品
     * 
     * @param swMedicine 药品
     * @return 结果
     */
    @Override
    public int insertSwMedicine(SwMedicine swMedicine)
    {
        return swMedicineMapper.insertSwMedicine(swMedicine);
    }

    /**
     * 修改药品
     * 
     * @param swMedicine 药品
     * @return 结果
     */
    @Override
    public int updateSwMedicine(SwMedicine swMedicine)
    {
        return swMedicineMapper.updateSwMedicine(swMedicine);
    }

    /**
     * 批量删除药品
     * 
     * @param ids 需要删除的药品主键
     * @return 结果
     */
    @Override
    public int deleteSwMedicineByIds(Long[] ids)
    {
        return swMedicineMapper.deleteSwMedicineByIds(ids);
    }

    /**
     * 删除药品信息
     * 
     * @param id 药品主键
     * @return 结果
     */
    @Override
    public int deleteSwMedicineById(Long id)
    {
        return swMedicineMapper.deleteSwMedicineById(id);
    }
}
