package com.huiju.estateagents.third.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huiju.estateagents.base.ResponseBean;
import com.huiju.estateagents.third.entity.TaThirdPartyMiniappConfig;
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken;

import java.util.Map;

/**
 * <p>
 *   服务类
 * </p>
 *
 * @author jobob
 * @since 2019-10-17
 */
public interface ITaThirdPartyMiniappConfigService extends IService<TaThirdPartyMiniappConfig> {
	
	/**
	 * 校验是否合法第三方接口调用
	 * @param tokenHeader
	 * @param appidHeader
	 * @param nowHeader
	 * @return
	 */
	String checkToken(String tokenHeader, String appidHeader, String nowHeader);

	/**
	 * 创建公众号人员并关联上小程序人员
	 * @param accessToken
	 * @param drainageId
	 * @param sponsorPersonId
	 * @param personId
	 */
	Map<String,Object> newMpPerson(WxMpOAuth2AccessToken accessToken, String mpAppid, String drainageId, String sponsorPersonId, String personId);

	/**
	 * 参加活动生成参与记录等
	 * @param mpAppid
	 * @param personId
	 * @param drainageId
	 */
	ResponseBean participateActivity(String mpAppid, String personId, String drainageId);

	/**
	 * 助力活动接口
	 * @param mpAppid
	 * @param mpPersonId
	 * @param sponsorPersonId
	 * @param drainageId
	 * @return
	 */
	ResponseBean helpActivity(String mpAppid, String mpPersonId, String sponsorPersonId, String drainageId);

	/**
	 * 获取活动排行榜
	 * @param drainageId
	 * @return
	 */
    ResponseBean getRanking(String drainageId);

	/**
	 * 根据personiD获取相关信息
	 * @param mpAppid
	 * @param targetId
	 * @param personId
	 * @return
	 */
	Map<String, Object> getPersonInfo(String mpAppid, String targetId, String personId);
}
