package com.ruoyi.supplier.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TCanteenSupplierMapper;
import com.ruoyi.supplier.domain.TCanteenSupplier;
import com.ruoyi.supplier.service.ITCanteenSupplierService;

/**
 * 供应商Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenSupplierServiceImpl implements ITCanteenSupplierService 
{
    @Autowired
    private TCanteenSupplierMapper tCanteenSupplierMapper;

    /**
     * 查询供应商
     * 
     * @param supplierId 供应商主键
     * @return 供应商
     */
    @Override
    public TCanteenSupplier selectTCanteenSupplierBySupplierId(Long supplierId)
    {
        return tCanteenSupplierMapper.selectTCanteenSupplierBySupplierId(supplierId);
    }

    /**
     * 查询供应商列表
     * 
     * @param tCanteenSupplier 供应商
     * @return 供应商
     */
    @Override
    public List<TCanteenSupplier> selectTCanteenSupplierList(TCanteenSupplier tCanteenSupplier)
    {
        return tCanteenSupplierMapper.selectTCanteenSupplierList(tCanteenSupplier);
    }

    /**
     * 新增供应商
     * 
     * @param tCanteenSupplier 供应商
     * @return 结果
     */
    @Override
    public int insertTCanteenSupplier(TCanteenSupplier tCanteenSupplier)
    {
        return tCanteenSupplierMapper.insertTCanteenSupplier(tCanteenSupplier);
    }

    /**
     * 修改供应商
     * 
     * @param tCanteenSupplier 供应商
     * @return 结果
     */
    @Override
    public int updateTCanteenSupplier(TCanteenSupplier tCanteenSupplier)
    {
        return tCanteenSupplierMapper.updateTCanteenSupplier(tCanteenSupplier);
    }

    /**
     * 批量删除供应商
     * 
     * @param supplierIds 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenSupplierBySupplierIds(Long[] supplierIds)
    {
        return tCanteenSupplierMapper.deleteTCanteenSupplierBySupplierIds(supplierIds);
    }

    /**
     * 删除供应商信息
     * 
     * @param supplierId 供应商主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenSupplierBySupplierId(Long supplierId)
    {
        return tCanteenSupplierMapper.deleteTCanteenSupplierBySupplierId(supplierId);
    }
}
