package com.zg.project.information.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zg.project.information.mapper.MaterialTypeMapper;
import com.zg.project.information.domain.MaterialType;
import com.zg.project.information.service.IMaterialTypeService;

/**
 * 物资类型Service业务层处理
 * 
 * @author zg
 * @date 2025-05-27
 */
@Service
public class MaterialTypeServiceImpl implements IMaterialTypeService 
{
    @Autowired
    private MaterialTypeMapper materialTypeMapper;

    /**
     * 查询物资类型
     * 
     * @param id 物资类型主键
     * @return 物资类型
     */
    @Override
    public MaterialType selectMaterialTypeById(Long id)
    {
        return materialTypeMapper.selectMaterialTypeById(id);
    }

    /**
     * 查询物资类型列表
     * 
     * @param materialType 物资类型
     * @return 物资类型
     */
    @Override
    public List<MaterialType> selectMaterialTypeList(MaterialType materialType)
    {
        return materialTypeMapper.selectMaterialTypeList(materialType);
    }

    /**
     * 新增物资类型
     * 
     * @param materialType 物资类型
     * @return 结果
     */
    @Override
    public int insertMaterialType(MaterialType materialType)
    {
        return materialTypeMapper.insertMaterialType(materialType);
    }

    /**
     * 修改物资类型
     * 
     * @param materialType 物资类型
     * @return 结果
     */
    @Override
    public int updateMaterialType(MaterialType materialType)
    {
        return materialTypeMapper.updateMaterialType(materialType);
    }

    /**
     * 批量删除物资类型
     * 
     * @param ids 需要删除的物资类型主键
     * @return 结果
     */
    @Override
    public int deleteMaterialTypeByIds(Long[] ids)
    {
        return materialTypeMapper.deleteMaterialTypeByIds(ids);
    }

    /**
     * 删除物资类型信息
     * 
     * @param id 物资类型主键
     * @return 结果
     */
    @Override
    public int deleteMaterialTypeById(Long id)
    {
        return materialTypeMapper.deleteMaterialTypeById(id);
    }
}
