package com.xinelu.manage.mapper.goodsOrderDetails;

import com.xinelu.manage.domain.goodsOrderDetails.GoodsOrderDetails;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品订单明细Mapper接口
 *
 * @author xinyilu
 * @date 2022-10-18
 */
public interface GoodsOrderDetailsMapper {
    /**
     * 查询商品订单明细
     *
     * @param id 商品订单明细主键
     * @return 商品订单明细
     */
    GoodsOrderDetails selectGoodsOrderDetailsById(Long id);

    /**
     * 查询商品订单明细列表
     *
     * @param goodsOrderDetails 商品订单明细
     * @return 商品订单明细集合
     */
    List<GoodsOrderDetails> selectGoodsOrderDetailsList(GoodsOrderDetails goodsOrderDetails);

    /**
     * 新增商品订单明细
     *
     * @param goodsOrderDetails 商品订单明细
     * @return 结果
     */
    int insertGoodsOrderDetails(GoodsOrderDetails goodsOrderDetails);

    /**
     * 修改商品订单明细
     *
     * @param goodsOrderDetails 商品订单明细
     * @return 结果
     */
    int updateGoodsOrderDetails(GoodsOrderDetails goodsOrderDetails);

    /**
     * 删除商品订单明细
     *
     * @param id 商品订单明细主键
     * @return 结果
     */
    int deleteGoodsOrderDetailsById(Long id);

    /**
     * 批量删除商品订单明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteGoodsOrderDetailsByIds(Long[] ids);

    /**
     * 根据订单数量和订单明细查询订单信息
     *
     * @param orderNo            订单编号
     * @param goodsOrderDetailId 明细id
     * @return 订单明细信息
     */
    GoodsOrderDetails getGoodsOrderDetailInfo(@Param("orderNo") String orderNo, @Param("goodsOrderDetailId") Long goodsOrderDetailId);
}
