package com.ruoyi.goods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.goods.mapper.TCanteenInventoryMapper;
import com.ruoyi.goods.domain.TCanteenInventory;
import com.ruoyi.goods.service.ITCanteenInventoryService;

/**
 * 库存Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenInventoryServiceImpl implements ITCanteenInventoryService 
{
    @Autowired
    private TCanteenInventoryMapper tCanteenInventoryMapper;

    /**
     * 查询库存
     * 
     * @param inventoryId 库存主键
     * @return 库存
     */
    @Override
    public TCanteenInventory selectTCanteenInventoryByInventoryId(Long inventoryId)
    {
        return tCanteenInventoryMapper.selectTCanteenInventoryByInventoryId(inventoryId);
    }

    /**
     * 查询库存列表
     * 
     * @param tCanteenInventory 库存
     * @return 库存
     */
    @Override
    public List<TCanteenInventory> selectTCanteenInventoryList(TCanteenInventory tCanteenInventory)
    {
        return tCanteenInventoryMapper.selectTCanteenInventoryList(tCanteenInventory);
    }

    /**
     * 新增库存
     * 
     * @param tCanteenInventory 库存
     * @return 结果
     */
    @Override
    public int insertTCanteenInventory(TCanteenInventory tCanteenInventory)
    {
        return tCanteenInventoryMapper.insertTCanteenInventory(tCanteenInventory);
    }

    /**
     * 修改库存
     * 
     * @param tCanteenInventory 库存
     * @return 结果
     */
    @Override
    public int updateTCanteenInventory(TCanteenInventory tCanteenInventory)
    {
        return tCanteenInventoryMapper.updateTCanteenInventory(tCanteenInventory);
    }

    /**
     * 批量删除库存
     * 
     * @param inventoryIds 需要删除的库存主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenInventoryByInventoryIds(Long[] inventoryIds)
    {
        return tCanteenInventoryMapper.deleteTCanteenInventoryByInventoryIds(inventoryIds);
    }

    /**
     * 删除库存信息
     * 
     * @param inventoryId 库存主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenInventoryByInventoryId(Long inventoryId)
    {
        return tCanteenInventoryMapper.deleteTCanteenInventoryByInventoryId(inventoryId);
    }
}
