package com.yunzhi.marketing.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.bo.request.PresecretRecordRequestBO;
import com.yunzhi.marketing.entity.TaPreselectionRecord;
import com.yunzhi.marketing.po.TaPreselectionRecordPO;

import java.util.List;

/**
 * <p>
 * 预选记录表  服务类
 * </p>
 *
 * @author jobob
 * @since 2020-02-10
 */
public interface ITaPreselectionRecordService extends IService<TaPreselectionRecord> {

    /**
     * 分页获取当前用户预选记录
     *
     * @param pageNum
     * @param pageSize
     * @param orgId
     * @param personId
     * @return
     */
    IPage<TaPreselectionRecordPO> listPreselectionRecord(Integer pageNum, Integer pageSize, Integer orgId, String personId, String buildingId,
                                                         Integer salesBatchId, String apartmentId, String houseLockingStatus, String customerLocked,
                                                         String source);

    /**
     * 添加预选记录预选
     *
     * @param taPreselectionRecord
     * @return
     */
    ResponseBean taPreselectionRecordAdd(TaPreselectionRecord taPreselectionRecord);

    /**
     * 取消预选
     *
     * @param personId
     * @param houseId  房源ID
     * @return
     */
    ResponseBean taPreselectionRecordCancel(String personId, Integer houseId);

    ResponseBean selectPreSelectRecordList(PresecretRecordRequestBO recordRequestBO, Integer pageNum, Integer pageSize);

    /**
     * 批量删除预选记录
     *
     * @param preselectionRecordList
     * @param orgId
     * @param userId
     * @return
     */
    ResponseBean batchDeletePreselectRecord(List<TaPreselectionRecord> preselectionRecordList, Integer orgId, Integer userId);

}
