package cn.ezhizao.project.business.collection.mapper;

import cn.ezhizao.project.business.collection.domain.BizCollection;
import cn.ezhizao.project.business.collection.domain.vo.ReqStatisticsVo;
import cn.ezhizao.project.business.collection.domain.vo.ResStatisticsVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author 朱汕
 */
@Mapper
public interface BizCollectionMapper extends BaseMapper<BizCollection> {

    /**
     * 带条件的查询
     *
     * @param conditions 条件
     * @return List 集合
     */
    List<BizCollection> getList(Map<String, Object> conditions);

    /**
     * 根据Bean查询 列表
     *
     * @param collection 实体类对象
     * @return List 集合
     */
    List<BizCollection> getList(BizCollection collection);

    /**
     * 带条件的查询总数
     *
     * @param conditions 条件
     * @return int 查询总数量
     */
    int getTotal(Map<String, Object> conditions);


    List<ResStatisticsVo> statistics(@Param("conditions") ReqStatisticsVo conditions);

    List<ResStatisticsVo> getByContractIn(@Param("conditions") ReqStatisticsVo conditions);

    List<ResStatisticsVo> getByContractOut(@Param("conditions") ReqStatisticsVo conditions);
}


