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.TCanteenSubmenuMapper;
import com.ruoyi.goods.domain.TCanteenSubmenu;
import com.ruoyi.goods.service.ITCanteenSubmenuService;

/**
 * 子菜单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenSubmenuServiceImpl implements ITCanteenSubmenuService 
{
    @Autowired
    private TCanteenSubmenuMapper tCanteenSubmenuMapper;

    /**
     * 查询子菜单
     * 
     * @param submenuId 子菜单主键
     * @return 子菜单
     */
    @Override
    public TCanteenSubmenu selectTCanteenSubmenuBySubmenuId(Long submenuId)
    {
        return tCanteenSubmenuMapper.selectTCanteenSubmenuBySubmenuId(submenuId);
    }

    /**
     * 查询子菜单列表
     * 
     * @param tCanteenSubmenu 子菜单
     * @return 子菜单
     */
    @Override
    public List<TCanteenSubmenu> selectTCanteenSubmenuList(TCanteenSubmenu tCanteenSubmenu)
    {
        return tCanteenSubmenuMapper.selectTCanteenSubmenuList(tCanteenSubmenu);
    }

    /**
     * 新增子菜单
     * 
     * @param tCanteenSubmenu 子菜单
     * @return 结果
     */
    @Override
    public int insertTCanteenSubmenu(TCanteenSubmenu tCanteenSubmenu)
    {
        return tCanteenSubmenuMapper.insertTCanteenSubmenu(tCanteenSubmenu);
    }

    /**
     * 修改子菜单
     * 
     * @param tCanteenSubmenu 子菜单
     * @return 结果
     */
    @Override
    public int updateTCanteenSubmenu(TCanteenSubmenu tCanteenSubmenu)
    {
        return tCanteenSubmenuMapper.updateTCanteenSubmenu(tCanteenSubmenu);
    }

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

    /**
     * 删除子菜单信息
     * 
     * @param submenuId 子菜单主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenSubmenuBySubmenuId(Long submenuId)
    {
        return tCanteenSubmenuMapper.deleteTCanteenSubmenuBySubmenuId(submenuId);
    }
}
