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

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 user
	 * @param drainageId
	 * @param sponsorPersonId
	 * @param personId
	 */
	Map<String,Object> newMpPerson(WxMpUser user, String mpAppid, String drainageId, String sponsorPersonId, String personId);

	/**
	 * 参加活动生成参与记录等
	 * @param mpAppid
	 * @param mpPersonId
	 * @param targetId
	 * @param orgId
	 */
	ResponseBean participateActivity(String mpAppid, String mpPersonId, String targetId, Integer orgId);

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