package com.bonus.zlpt.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.zlpt.order.mapper.OrderDetailsMapper;
import com.bonus.zlpt.common.core.domain.order.OrderDetails;
import com.bonus.zlpt.order.service.IOrderDetailsService;

/**
 * 订单详细Service业务层处理
 * 
 * @author xsheng
 * @date 2023-12-01
 */
@Service
public class OrderDetailsServiceImpl implements IOrderDetailsService 
{
    @Autowired
    private OrderDetailsMapper orderDetailsMapper;

    /**
     * 查询订单详细
     * 
     * @param id 订单详细主键
     * @return 订单详细
     */
    @Override
    public OrderDetails selectOrderDetailsById(Long id)
    {
        return orderDetailsMapper.selectOrderDetailsById(id);
    }

    /**
     * 查询订单详细列表
     * 
     * @param orderDetails 订单详细
     * @return 订单详细
     */
    @Override
    public List<OrderDetails> selectOrderDetailsList(OrderDetails orderDetails)
    {
        return orderDetailsMapper.selectOrderDetailsList(orderDetails);
    }

    /**
     * 新增订单详细
     * 
     * @param orderDetails 订单详细
     * @return 结果
     */
    @Override
    public int insertOrderDetails(OrderDetails orderDetails)
    {
        return orderDetailsMapper.insertOrderDetails(orderDetails);
    }

    /**
     * 修改订单详细
     * 
     * @param orderDetails 订单详细
     * @return 结果
     */
    @Override
    public int updateOrderDetails(OrderDetails orderDetails)
    {
        return orderDetailsMapper.updateOrderDetails(orderDetails);
    }

    /**
     * 批量删除订单详细
     * 
     * @param ids 需要删除的订单详细主键
     * @return 结果
     */
    @Override
    public int deleteOrderDetailsByIds(Long[] ids)
    {
        return orderDetailsMapper.deleteOrderDetailsByIds(ids);
    }

    /**
     * 删除订单详细信息
     * 
     * @param id 订单详细主键
     * @return 结果
     */
    @Override
    public int deleteOrderDetailsById(Long id)
    {
        return orderDetailsMapper.deleteOrderDetailsById(id);
    }
}
