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.TCanteenMenuMapper;
import com.ruoyi.goods.domain.TCanteenMenu;
import com.ruoyi.goods.service.ITCanteenMenuService;

/**
 * 菜单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenMenuServiceImpl implements ITCanteenMenuService 
{
    @Autowired
    private TCanteenMenuMapper tCanteenMenuMapper;

    /**
     * 查询菜单
     * 
     * @param menuId 菜单主键
     * @return 菜单
     */
    @Override
    public TCanteenMenu selectTCanteenMenuByMenuId(Long menuId)
    {
        return tCanteenMenuMapper.selectTCanteenMenuByMenuId(menuId);
    }

    /**
     * 查询菜单列表
     * 
     * @param tCanteenMenu 菜单
     * @return 菜单
     */
    @Override
    public List<TCanteenMenu> selectTCanteenMenuList(TCanteenMenu tCanteenMenu)
    {
        return tCanteenMenuMapper.selectTCanteenMenuList(tCanteenMenu);
    }

    /**
     * 新增菜单
     * 
     * @param tCanteenMenu 菜单
     * @return 结果
     */
    @Override
    public int insertTCanteenMenu(TCanteenMenu tCanteenMenu)
    {
        return tCanteenMenuMapper.insertTCanteenMenu(tCanteenMenu);
    }

    /**
     * 修改菜单
     * 
     * @param tCanteenMenu 菜单
     * @return 结果
     */
    @Override
    public int updateTCanteenMenu(TCanteenMenu tCanteenMenu)
    {
        return tCanteenMenuMapper.updateTCanteenMenu(tCanteenMenu);
    }

    /**
     * 批量删除菜单
     * 
     * @param menuIds 需要删除的菜单主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenMenuByMenuIds(Long[] menuIds)
    {
        return tCanteenMenuMapper.deleteTCanteenMenuByMenuIds(menuIds);
    }

    /**
     * 删除菜单信息
     * 
     * @param menuId 菜单主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenMenuByMenuId(Long menuId)
    {
        return tCanteenMenuMapper.deleteTCanteenMenuByMenuId(menuId);
    }
}
