package com.yunzhi.marketing.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhi.marketing.entity.*;

/**
 * <p>
 * 积分消费流水表  服务类
 * </p>
 *
 * @author jobob
 * @since 2019-07-25
 */
public interface ITaPointsRecordsService extends IService<TaPointsRecords> {
	
	/**
	 * 根据code获取积分
	 * @param code
	 * @param orgId
	 * @return
	 */
	Integer getRulePoints(String code,Integer orgId);
	
	// 分享赚积分
	void sharePoints(TaShare taShare, Integer orgId);

	// 签到赚积分
	void checkinPoints(TaPersonSign taPersonSign, Integer orgId);

	// 签到赚积分
	void checkinActivityPoints(TaActivityDynamicEnlist taActivityDynamicEnlist, Integer orgId);

	// 注册送积分
	void signUpPoints(TaPerson taPerson, Integer orgId);

	// 推荐客户送积分
	void recommendCustPoints(TaRecommendCustomer taRecommendCustomer, Integer orgId);

	void consumeGoodsPoints(TaGoods taGoods, Integer orgId);

	IPage<TaPointsRecords> getWxRecords(Integer pageNum,Integer pageSize,String personId);

	/**
	 * 分享积分增加  人员不限制
	 * @param recommenderId
	 */
    void sharePosterAll(String recommenderId, Integer orgId);

	/**
	 * 资料审核送积分
	 * @param taDocumentVerify
	 * @param orgId
	 */
	void documentVerify(TaDocumentVerify taDocumentVerify, Integer orgId);

	/**
	 * 活动核销送积分
	 * @param helpInitiateRecord
	 * @param orgId
	 */
	void activityVerificationSign(HelpInitiateRecord helpInitiateRecord, Integer orgId);
	
	/**
	 * 消费拼团积分
	 * @param person
	 * @param integral
	 * @param buildingId
	 * @param groupActivityId
	 */
	void saveGroupRecord(TaPerson person, Integer integral, String buildingId, Integer groupActivityId);

	Integer sumPointByPersonId(String personId);
}
