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

import com.slodon.b2b2c.core.database.BaseReadMapper;
import com.slodon.b2b2c.statistics.example.GoodsDayExample;
import com.slodon.b2b2c.statistics.pojo.GoodsDay;
import com.slodon.b2b2c.statistics.pojo.base.GoodsBase;
import com.slodon.b2b2c.vo.statistics.SalesTrendVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品日统计表readDao
 */
public interface GoodsDayReadMapper extends BaseReadMapper<GoodsDay, GoodsDayExample> {

    /**
     * 查询符合条件的分组记录数
     *
     * @param example
     * @return
     */
    Integer getGoodsCount(@Param("example") GoodsDayExample example);

    /**
     * 商品统计
     *
     * @param example
     * @param startRow
     * @param size
     * @return
     */
    List<GoodsBase> getGoodsList(@Param("example") GoodsDayExample example,
                                 @Param("startRow") Integer startRow,
                                 @Param("size") Integer size);

    /**
     * 商品销售变化趋势
     *
     * @param example
     * @return
     */
    List<SalesTrendVO> getGoodsTrendList(@Param("example") GoodsDayExample example);
}