package com.yunzhi.marketing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.entity.HelpActivity;
import com.yunzhi.marketing.entity.TaPerson;
import com.yunzhi.marketing.entity.TaPersonBuilding;
import com.yunzhi.marketing.excel.HelpInitiateRecordSucceed;
import com.yunzhi.marketing.excel.HelpProceedAndFinish;
import com.yunzhi.marketing.excel.HelpRecordExport;

import java.util.List;

/**
 * <p>
 * 助力活动  服务类
 * </p>
 *
 * @author jobob
 * @since 2019-10-17
 */
public interface IHelpActivityService extends IService<HelpActivity> {
    /**
     * 活动助力列表
     * @param pageNum
     * @param pageSize
     * @param cityId
     * @param buildingId
     * @param title
     * @param startDate
     * @param endDate
     * @param activityStatus
     * @param orgId
     * @return
     */
    ResponseBean helpActivityList(Integer pageNum, Integer pageSize, Integer cityId, String buildingId, String title, String startDate, String endDate, Integer activityStatus, Integer orgId,List<TaPersonBuilding> personBuildingList);

    /**
     * 活动助力添加
     * @param helpActivity
     */
    int helpActivityAdd(HelpActivity helpActivity,Integer orgId);

    /**
     * 活动助力修改
     * @param helpActivity
     * @return
     */
    void helpActivityUpdate(HelpActivity helpActivity);

    /**
     * 助力记录（成功，进行中，失败）
     * @param helpActivityId
     * @return
     */
    ResponseBean helpRecord(Integer helpActivityId,String status,Integer pageNum,Integer pageSize,String tel);

    /**
     * 当前发起人的助力人数
     * @param helpRecordInitiateId
     * @param pageNum
     * @param pageSize
     * @return
     */
    ResponseBean taHelpRecordDetails(Integer helpRecordInitiateId, Integer pageNum, Integer pageSize);

    /**
     * 验证核销码是否正确
     * @param helpRecordInitiateId
     * @param verifyCode
     * @return
     */
    ResponseBean helpInitiateRecordVerify(Integer helpRecordInitiateId, String verifyCode);

    /**
     * 查询当前导出数据的总数
     * @param tel
     * @param helpActivityId
     * @return
     */
    Integer getHelpInitiateRecordSucceed(String tel, Integer helpActivityId);

    /**
     * 导出助力成功数据
     * @param i
     * @param pageSize
     * @param tel
     * @param helpActivityId
     * @return
     */
    List<HelpInitiateRecordSucceed> getHelpInitiateRecordSucceedExportList(int i, Integer pageSize, String tel, Integer helpActivityId);

    /**
     * 导出助力成功或者失败
     * @param i
     * @param pageSize
     * @param tel
     * @param helpActivityId
     * @return
     */
    List<HelpProceedAndFinish> getHelpProceedAndFinishExportList(int i, Integer pageSize, String tel, Integer helpActivityId,String condition);

    /**
     * 查询当前导出数据的总数
     * @param helpRecordInitiateId
     * @return
     */
    Integer getHelpRecord(Integer helpRecordInitiateId);

    /**
     * 查询当前助力者记录
     * @param i
     * @param pageSize
     * @param helpRecordInitiateId
     * @return
     */
    List<HelpRecordExport> getHelpRecordExportList(int i, Integer pageSize, Integer helpRecordInitiateId);

    /**
     * 未开始的助力活动
     */
    void updateActivityToUnStart();

    /**
     * 开始助力活动
     */
    void updateUnStartHelpActivity();

    /**
     * 结束助力活动
     */
    void updateProcessingHelpActivity();

    /**
     * 微信端查询拼团和助力推首页的活动的
     * @param orgId
     * @return
     */
    ResponseBean wxhelpActivityAndGroup(Integer orgId, String buildingId, String cityID, TaPerson person);

    /**
     * 列表  已开始 和 未开始
     * @param pageNum
     * @param pageSize
     * @param cityId
     * @param orgId
     * @return
     */
    ResponseBean helpActivityEffectiveList(Integer pageNum, Integer pageSize, Integer cityId, Integer orgId, String buildingId,Integer status,String name,List<TaPersonBuilding> personBuildingList);
}
