package com.huiju.estateagents.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huiju.estateagents.base.ResponseBean;
import com.huiju.estateagents.entity.TaPerson;
import com.huiju.estateagents.entity.TaShareRecord;
import com.huiju.estateagents.excel.ShareChildRecordExport;
import com.huiju.estateagents.excel.ShareRecordFailExport;
import com.huiju.estateagents.excel.ShareRecordSuccessExport;
import com.huiju.estateagents.po.TaShareRecordPO;

import java.util.List;


/**
 * <p>
 * 拼团记录  服务类
 * </p>
 *
 * @author jobob
 * @since 2019-10-18
 */
public interface ITaShareRecordService extends IService<TaShareRecord> {
    IPage<TaShareRecord> getSuccessList(Integer pageNum, Integer pageSize, String phone, Integer status, Integer groupActivityId, Integer orgId);
    IPage<TaShareRecordPO> getFailAndProcessingList(Integer pageNum, Integer pageSize, String phone, Integer status, Integer groupActivityId, Integer orgId);
    ResponseBean validateRule(TaShareRecord taShareRecord);
    ResponseBean verifyCode(Integer activityId, String verifyCode, String recordId);
    Integer getShareRecord(Integer recordId, Integer status);
    List<ShareRecordSuccessExport>  getShareRecordSuccessExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
    List<ShareRecordFailExport>  getShareRecordFailExportList(Integer pageCode, Integer pageSize, Integer recordId, Integer status, Integer groupActivityId);
	void updateActivityProcessToEnd();

	/**
	 * 根据拼团活动id更新发团者拼团失败
	 */
	void updateActivityProcessToEndByGroupActivityId(Integer groupActivityId);

    /**
	 * 分页获取微信端发起拼团记录
	 * @param pageNum
	 * @param pageSize
	 * @param orgId
	 * @param person
	 * @return
	 */
	ResponseBean getShareRecordList(Integer pageNum, Integer pageSize, Integer orgId, TaPerson person);
	
	/**
	 * 微信端发起我的拼团
	 * @param taShareRecord
	 * @param orgId
	 * @param person
	 * @return
	 */
	ResponseBean saveShareRecord(TaShareRecord taShareRecord, Integer orgId, TaPerson person);
}
