package com.xingxi.business.Order.mapper;

import com.xingxi.business.Order.domain.OrderDetail;

import java.util.List;

/**
 * 订单明细Mapper接口
 *
 * @author xingxi
 * @date 2025-03-06
 */
public interface OrderDetailMapper {
    /**
     * 查询订单明细
     *
     * @param orderDetailId 订单明细主键
     * @return 订单明细
     */
    OrderDetail selectOrderDetailByOrderDetailId(Long orderDetailId);

    /**
     * 查询订单明细列表
     *
     * @param orderDetail 订单明细
     * @return 订单明细集合
     */
    List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail);

    /**
     * 新增订单明细
     *
     * @param orderDetail 订单明细
     * @return 结果
     */
    int insertOrderDetail(OrderDetail orderDetail);

    /**
     * 批量新增订单明细
     *
     * @param orderDetailList 订单明细
     * @return 结果
     */
    int batchInsertOrderDetail(List<OrderDetail> orderDetailList);

    /**
     * 修改订单明细
     *
     * @param orderDetail 订单明细
     * @return 结果
     */
    int updateOrderDetail(OrderDetail orderDetail);

    /**
     * 删除订单明细
     *
     * @param orderDetailId 订单明细主键
     * @return 结果
     */
    int deleteOrderDetailByOrderDetailId(Long orderDetailId);

    /**
     * 批量删除订单明细
     *
     * @param orderDetailIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteOrderDetailByOrderDetailIds(String[] orderDetailIds);


    /**
     * 逻辑删除订单明细
     *
     * @param orderDetailId 订单明细主键
     * @return 结果
     */
    int logicDeleteOrderDetailByOrderDetailId(Long orderDetailId);

    /**
     * 逻辑批量删除订单明细
     *
     * @param orderDetailIds 需要删除的数据主键集合
     * @return 结果
     */
    int logicDeleteOrderDetailByOrderDetailIds(String[] orderDetailIds);

    /**
     * 逻辑批量删除订单明细
     *
     * @param orderDetail 订单明细
     * @return 结果
     */
    int logicDeleteOrderDetailByCondition(OrderDetail orderDetail);

}
