package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.mapper.PosFoodMapper;
import com.ruoyi.system.domain.PosFood;
import com.ruoyi.system.service.IPosFoodService;

/**
 * foodService业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-21
 */
@Service
public class PosFoodServiceImpl extends ServiceImpl<BaseMapper<PosFood>,PosFood> implements IPosFoodService
{
    @Autowired
    private PosFoodMapper posFoodMapper;

    /**
     * 查询food
     * 
     * @param id food主键
     * @return food
     */
    @Override
    public PosFood selectPosFoodById(Long id)
    {
        return posFoodMapper.selectPosFoodById(id);
    }

    /**
     * 查询food列表
     * 
     * @param posFood food
     * @return food
     */
    @Override
    public List<PosFood> selectPosFoodList(PosFood posFood)
    {
        return posFoodMapper.selectPosFoodList(posFood);
    }

    /**
     * 新增food
     * 
     * @param posFood food
     * @return 结果
     */
    @Override
    public int insertPosFood(PosFood posFood)
    {
        return posFoodMapper.insertPosFood(posFood);
    }

    /**
     * 修改food
     * 
     * @param posFood food
     * @return 结果
     */
    @Override
    public int updatePosFood(PosFood posFood)
    {
        return posFoodMapper.updatePosFood(posFood);
    }

    /**
     * 批量删除food
     * 
     * @param ids 需要删除的food主键
     * @return 结果
     */
    @Override
    public int deletePosFoodByIds(Long[] ids)
    {
        return posFoodMapper.deletePosFoodByIds(ids);
    }

    /**
     * 删除food信息
     * 
     * @param id food主键
     * @return 结果
     */
    @Override
    public int deletePosFoodById(Long id)
    {
        return posFoodMapper.deletePosFoodById(id);
    }
}
