package com.slodon.b2b2c.dao.read.business;

import com.slodon.b2b2c.business.dto.OrderProductDTO;
import com.slodon.b2b2c.business.example.OrderProductExample;
import com.slodon.b2b2c.business.pojo.OrderProduct;
import com.slodon.b2b2c.core.database.BaseReadMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderProductReadMapper extends BaseReadMapper<OrderProduct, OrderProductExample> {

    /**
     * 订单货品统计
     *
     * @param example
     * @return
     */
    List<OrderProductDTO> getOrderProductDtoList(@Param("example") OrderProductExample example);

    /**
     * 订单货品统计
     *
     * @param example
     * @param startRow
     * @param size
     * @return
     */
    List<OrderProductDTO> getOrderProductDtoListPage(@Param("example") OrderProductExample example,
                                                     @Param("startRow") Integer startRow,
                                                     @Param("size") Integer size);

    /**
     * 订单货品统计数量
     *
     * @param example
     * @return
     */
    Integer getOrderProductCount(@Param("example") OrderProductExample example);
}