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.entity.TaPerson;
import com.yunzhi.marketing.entity.TaShareRecord;
import com.yunzhi.marketing.excel.ShareRecordFailExport;
import com.yunzhi.marketing.excel.ShareRecordSuccessExport;
import com.yunzhi.marketing.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);
}
