package com.yunzhi.marketing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.entity.TaPersonBuilding;
import com.yunzhi.marketing.entity.TaRaise;

import java.util.List;

/**
 * <p>
 * 认筹表  服务类
 * </p>
 *
 * @author jobob
 * @since 2020-02-26
 */
public interface ITaRaiseService extends IService<TaRaise> {

    /**
     * 获取销售批次列表 - 认筹
     *
     * @param pageSize
     * @param pageNum
     * @param salesBatchName
     * @param buildingId
     * @param orgId
     * @param status
     * @return
     */
    ResponseBean listRaiseByCondition(Integer pageSize, Integer pageNum, String salesBatchName, String buildingId,
                                      Integer orgId, Integer status, List<TaPersonBuilding> taPersonBuildingListByUserId);

    /**
     * 批量删除
     *
     * @param taRaiseList
     * @param orgId
     * @return
     */
    ResponseBean batchDelete(List<TaRaise> taRaiseList, Integer orgId);

    /**
     * @param id
     * @param orgId
     * @return
     */
    ResponseBean getRaiseById(Integer id, Integer orgId);

    /**
     * @param raiseId
     * @param raiseRecordId
     * @param salesBatchId
     * @return
     */
    TaRaise getRaiseProfile(Integer raiseId, Integer raiseRecordId, Integer salesBatchId);

    /**
     * 新增或添加被邀请人表
     *
     * @param taRaise
     * @param orgId
     * @param isAdd   是否新增 1是 0否，为新增则直接保存 不用校验是否已经添加过该邀请手机号
     * @return
     */
    Boolean saveOrUpdateInvite(TaRaise taRaise, Integer orgId, Boolean isAdd);
}
