package com.gxwebsoft.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.shop.entity.OrderGoods;
import com.gxwebsoft.shop.param.OrderGoodsParam;

import java.util.List;

/**
 * 订单商品记录表Service
 *
 * @author 科技小王子
 * @since 2022-12-09 17:15:31
 */
public interface OrderGoodsService extends IService<OrderGoods> {

    List<OrderGoods> listByOrderIds(List<Integer> orderIds);

    /**
     * 分页关联查询
     *
     * @param param 查询参数
     * @return PageResult<OrderGoods>
     */
    PageResult<OrderGoods> pageRel(OrderGoodsParam param);

    /**
     * 关联查询全部
     *
     * @param param 查询参数
     * @return List<OrderGoods>
     */
    List<OrderGoods> listRel(OrderGoodsParam param);

    /**
     * 根据id查询
     *
     * @param orderGoodsId 订单商品ID
     * @return OrderGoods
     */
    OrderGoods getByIdRel(Integer orderGoodsId);

    int countBySettled(OrderGoodsParam param);
}
