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.TaShareActivity;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 拼团活动表  服务类
 * </p>
 *
 * @author jobob
 * @since 2019-10-17
 */
public interface ITaShareActivityService extends IService<TaShareActivity> {

    ResponseBean getList(Integer pageNum, Integer pageSize, String buildingId, String activityName, String status, LocalDateTime startTime, LocalDateTime endTime, Integer cityId, Integer orgId, List<TaPersonBuilding> personBuildingList);

    /**
     * 判断活动是否开始
     */
    void updateActivityToUnStart();

    /**
     * 活动未开始更新为进行中
     */
    void updateUnStartGroupActivity();

    /**
     * 活动进行中更新为已结束
     */
    void updateProcessingGroupActivity();

    /**
     * 查询拼团  已开始 和 未开始
     * @param pageNum
     * @param pageSize
     * @param cityId
     * @param orgId
     * @return
     */
    ResponseBean getEffectiveList(Integer pageNum, Integer pageSize, Integer cityId, String buildingId, Integer orgId,Integer status,String name,List<TaPersonBuilding> personBuildingList);

    Integer countGroupBuyPeople(TaShareActivity taShareActivity);
}
