package com.huiju.estateagents.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huiju.estateagents.entity.TaPersonBuilding;
import com.huiju.estateagents.entity.TaPersonIntentionRecord;
import com.huiju.estateagents.excel.IntentionUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 用户意向流水  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-08-07
 */
@Mapper
public interface TaPersonIntentionRecordMapper extends BaseMapper<TaPersonIntentionRecord> {


    IPage<TaPersonIntentionRecord> selectAll(IPage<TaPersonIntentionRecord> page);

    /**
     * 意向用户， 首页统计的 意向用户
     * @param page
     * @param buildingId
     * @return
     */
    IPage<Map<String, Object>> selectIntentionUser(IPage<Map<String, Object>> page,
                                                   @Param("orgId") Integer orgId,
                                                   @Param("buildingId") String buildingId,
                                                   @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);

    List<IntentionUser> selectExportIntentionUser(@Param("orgId") Integer orgId,@Param("buildingId") String buildingId,@Param("personBuildingList") List<TaPersonBuilding> taPersonBuildingListByUserId);
}
