package com.willalp.canteen.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;

import com.willalp.canteen.domain.HsCanteenMenuCustom;
import com.willalp.canteen.service.IHsCanteenMenuCustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.willalp.canteen.mapper.HsCanteenMenuCustomMapper;

/**
 * 自由消费定制菜单Service业务层处理
 *
 * @author songyu
 * @date 2021-12-15
 */
@Service
public class HsCanteenMenuCustomServiceImpl extends ServiceImpl<HsCanteenMenuCustomMapper, HsCanteenMenuCustom>  implements IHsCanteenMenuCustomService
{
    @Autowired
    private HsCanteenMenuCustomMapper hsCanteenMenuCustomMapper;

    /**
     * 查询自由消费定制菜单
     *
     * @param customId 自由消费定制菜单主键
     * @return 自由消费定制菜单
     */
    @Override
    public HsCanteenMenuCustom selectHsCanteenMenuCustomByCustomId(Long customId)
    {
        return hsCanteenMenuCustomMapper.selectHsCanteenMenuCustomByCustomId(customId);
    }

    /**
     * 查询自由消费定制菜单列表
     *
     * @param hsCanteenMenuCustom 自由消费定制菜单
     * @return 自由消费定制菜单
     */
    @Override
    public List<HsCanteenMenuCustom> selectHsCanteenMenuCustomList(HsCanteenMenuCustom hsCanteenMenuCustom)
    {
        return hsCanteenMenuCustomMapper.selectHsCanteenMenuCustomList(hsCanteenMenuCustom);
    }

    /**
     * 新增自由消费定制菜单
     *
     * @param hsCanteenMenuCustom 自由消费定制菜单
     * @return 结果
     */
    @Override
    public int insertHsCanteenMenuCustom(HsCanteenMenuCustom hsCanteenMenuCustom)
    {
        return hsCanteenMenuCustomMapper.insertHsCanteenMenuCustom(hsCanteenMenuCustom);
    }

    /**
     * 修改自由消费定制菜单
     *
     * @param hsCanteenMenuCustom 自由消费定制菜单
     * @return 结果
     */
    @Override
    public int updateHsCanteenMenuCustom(HsCanteenMenuCustom hsCanteenMenuCustom)
    {
        return hsCanteenMenuCustomMapper.updateHsCanteenMenuCustom(hsCanteenMenuCustom);
    }

    /**
     * 批量删除自由消费定制菜单
     *
     * @param customIds 需要删除的自由消费定制菜单主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenMenuCustomByCustomIds(Long[] customIds)
    {
        return hsCanteenMenuCustomMapper.deleteHsCanteenMenuCustomByCustomIds(customIds);
    }

    /**
     * 删除自由消费定制菜单信息
     *
     * @param customId 自由消费定制菜单主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenMenuCustomByCustomId(Long customId)
    {
        return hsCanteenMenuCustomMapper.deleteHsCanteenMenuCustomByCustomId(customId);
    }
}
