package com.huimv.produce.produce.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.huimv.produce.produce.entity.ProdSales;
import com.huimv.produce.produce.entity.dto.ClientHomeDto;
import com.huimv.produce.produce.entity.dto.ProdSalesDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2021-11-25
 */
@Repository
public interface ProdSalesMapper extends BaseMapper<ProdSales> {

    ProdSalesDto countMonth(@Param(Constants.WRAPPER) QueryWrapper<ProdSales> wrapper);

    ClientHomeDto listClientHome(@Param("farmId") Integer farmId);

    List<ProdSales> selectLastDay(Integer farmId, String startDate, String endDate);
}
