package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TbOrderDetailMapper;
import com.ruoyi.order.domain.TbOrderDetail;
import com.ruoyi.order.service.ITbOrderDetailService;

/**
 * 单据明细Service业务层处理
 * 
 * @author 原动力
 * @date 2023-05-24
 */
@Service
public class TbOrderDetailServiceImpl implements ITbOrderDetailService 
{
    @Autowired
    private TbOrderDetailMapper tbOrderDetailMapper;

    /**
     * 查询单据明细
     * 
     * @param id 单据明细主键
     * @return 单据明细
     */
    @Override
    public TbOrderDetail selectTbOrderDetailById(Long id)
    {
        return tbOrderDetailMapper.selectTbOrderDetailById(id);
    }

    /**
     * 查询单据明细列表
     * 
     * @param tbOrderDetail 单据明细
     * @return 单据明细
     */
    @Override
    public List<TbOrderDetail> selectTbOrderDetailList(TbOrderDetail tbOrderDetail)
    {
        return tbOrderDetailMapper.selectTbOrderDetailList(tbOrderDetail);
    }

    /**
     * 新增单据明细
     * 
     * @param tbOrderDetail 单据明细
     * @return 结果
     */
    @Override
    public int insertTbOrderDetail(TbOrderDetail tbOrderDetail)
    {
        return tbOrderDetailMapper.insertTbOrderDetail(tbOrderDetail);
    }

    /**
     * 修改单据明细
     * 
     * @param tbOrderDetail 单据明细
     * @return 结果
     */
    @Override
    public int updateTbOrderDetail(TbOrderDetail tbOrderDetail)
    {
        return tbOrderDetailMapper.updateTbOrderDetail(tbOrderDetail);
    }

    /**
     * 批量删除单据明细
     * 
     * @param ids 需要删除的单据明细主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderDetailByIds(Long[] ids)
    {
        return tbOrderDetailMapper.deleteTbOrderDetailByIds(ids);
    }

    /**
     * 删除单据明细信息
     * 
     * @param id 单据明细主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderDetailById(Long id)
    {
        return tbOrderDetailMapper.deleteTbOrderDetailById(id);
    }
}
