package com.jeequan.jeepay.core.interfaces.wxmp;

import com.jeequan.jeepay.core.entity.MchWxmpUser;
import com.jeequan.jeepay.core.model.DBWxMpConfig;
import com.jeequan.jeepay.core.model.wx.wxmp.WxUserInfo;

import java.util.List;

/*
* 接口：微信公众号授权回调 code -> openid
*
* @author zx
*
* @date 2021/5/8 15:14
*/
public interface IWxMpTemplateMsgService {

    /**
     * 回调code 获取accessToken 获取wxUserInfo
     * @param code
     * @return
     */
    WxUserInfo code2WxUserInfo(String code, DBWxMpConfig wxMpConfig);

    /**
     * 发送模板消息
     * @param userList
     * @param templateMessage
     */
    void sendTemplateMessage(List<MchWxmpUser> userList, String templateMessage, DBWxMpConfig wxMpConfig,String templateId);

//
//    /**
//     * 扩展发送消息
//     * @param userList
//     * @param templateMessage
//     */
//    void sendTemplateMessageExtend(List<MchWxmpUser> userList, String templateMessage, DBWxMpConfig wxMpConfig);
}
