package com.willalp.canteen.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.willalp.canteen.mapper.HsCanteenOrderDetailMapper;
import com.willalp.canteen.domain.HsCanteenOrderDetail;
import com.willalp.canteen.service.IHsCanteenOrderDetailService;

/**
 * 食堂订单明细Service业务层处理
 *
 * @author songyu
 * @date 2021-12-03
 */
@Service
public class HsCanteenOrderDetailServiceImpl extends ServiceImpl<HsCanteenOrderDetailMapper, HsCanteenOrderDetail>  implements IHsCanteenOrderDetailService
{
    @Autowired
    private HsCanteenOrderDetailMapper hsCanteenOrderDetailMapper;

    /**
     * 查询食堂订单明细
     *
     * @param detailId 食堂订单明细主键
     * @return 食堂订单明细
     */
    @Override
    public HsCanteenOrderDetail selectHsCanteenOrderDetailByDetailId(String detailId)
    {
        return hsCanteenOrderDetailMapper.selectHsCanteenOrderDetailByDetailId(detailId);
    }

    /**
     * 查询食堂订单明细列表
     *
     * @param hsCanteenOrderDetail 食堂订单明细
     * @return 食堂订单明细
     */
    @Override
    public List<HsCanteenOrderDetail> selectHsCanteenOrderDetailList(HsCanteenOrderDetail hsCanteenOrderDetail)
    {
        return hsCanteenOrderDetailMapper.selectHsCanteenOrderDetailList(hsCanteenOrderDetail);
    }

    /**
     * 新增食堂订单明细
     *
     * @param hsCanteenOrderDetail 食堂订单明细
     * @return 结果
     */
    @Override
    public int insertHsCanteenOrderDetail(HsCanteenOrderDetail hsCanteenOrderDetail)
    {
        return hsCanteenOrderDetailMapper.insertHsCanteenOrderDetail(hsCanteenOrderDetail);
    }

    /**
     * 修改食堂订单明细
     *
     * @param hsCanteenOrderDetail 食堂订单明细
     * @return 结果
     */
    @Override
    public int updateHsCanteenOrderDetail(HsCanteenOrderDetail hsCanteenOrderDetail)
    {
        return hsCanteenOrderDetailMapper.updateHsCanteenOrderDetail(hsCanteenOrderDetail);
    }

    /**
     * 批量删除食堂订单明细
     *
     * @param detailIds 需要删除的食堂订单明细主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenOrderDetailByDetailIds(String[] detailIds)
    {
        return hsCanteenOrderDetailMapper.deleteHsCanteenOrderDetailByDetailIds(detailIds);
    }

    /**
     * 删除食堂订单明细信息
     *
     * @param detailId 食堂订单明细主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenOrderDetailByDetailId(String detailId)
    {
        return hsCanteenOrderDetailMapper.deleteHsCanteenOrderDetailByDetailId(detailId);
    }
}
