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

import java.util.List;

import com.zhyc.module.biosafety.domain.SwMedicType;
import com.zhyc.module.biosafety.mapper.SwMedicTypeMapper;
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 药品类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class SwMedicTypeServiceImpl implements ISwMedicTypeService
{
    @Autowired
    private SwMedicTypeMapper swMedicTypeMapper;

    /**
     * 查询药品类型
     * 
     * @param id 药品类型主键
     * @return 药品类型
     */
    @Override
    public SwMedicType selectSwMedicTypeById(Long id)
    {
        return swMedicTypeMapper.selectSwMedicTypeById(id);
    }

    /**
     * 查询药品类型列表
     * 
     * @param swMedicType 药品类型
     * @return 药品类型
     */
    @Override
    public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType)
    {
        return swMedicTypeMapper.selectSwMedicTypeList(swMedicType);
    }

    /**
     * 新增药品类型
     * 
     * @param swMedicType 药品类型
     * @return 结果
     */
    @Override
    public int insertSwMedicType(SwMedicType swMedicType)
    {
        return swMedicTypeMapper.insertSwMedicType(swMedicType);
    }

    /**
     * 修改药品类型
     * 
     * @param swMedicType 药品类型
     * @return 结果
     */
    @Override
    public int updateSwMedicType(SwMedicType swMedicType)
    {
        return swMedicTypeMapper.updateSwMedicType(swMedicType);
    }

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

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