package cn.pluss.platform.wechat;


/**
 *
 *微信常量配置类
 *@author: bzg
 *@time: 2021/11/29 15:45
 */
public class WxConstants {

    /**
     * 公众号获取accesstoken URl
     * @date: 2021/11/29 18:06
     */
    public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=SECRET";

    /**
     * 跳转微信scheme
     */
    public static final String GENERATE_SCHEME = "https://api.weixin.qq.com/wxa/generatescheme?access_token=ACCESS_TOKEN";

    /**
     * 获取网页授权token
     * @date: 2021/11/30 10:08
     */
    public static final String OAUTH2_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";

    /**
     * 获取小程序OPENID url
     * @date: 2021/11/29 18:06
     */
    public static final String WX_APPLET_OPENID_URL = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=CODE&grant_type=authorization_code";

    /**
     * 用户信息url
     * @date: 2021/11/30 13:36
     */
    public static final String WX_USER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
    /**
     * 发送模板消息接口url
     * @date: 2021/11/29 18:07
     */
    public static final String WX_SEND_TEMPLATE_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";

    /**
     * 生成微信带参数的二维码url
     * @date: 2021/11/29 18:07
     */
    public static final String WX_CREATE_QR_CODE_URL = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=ACCESS_TOKEN";

    /**
     * 获取ticket
     * @date: 2021/11/29 18:07
     */
    public static final String WX_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=TYPE";


    public static final String ERRCODE_NAME_PARAM = "errcode";

    /**
     * 二维码类型，QR_SCENE为临时的整型参数值
     * @date: 2021/12/9 11:32
     */
    public static final String QR_SCENE = "QR_SCENE";

    /**
     * 二维码类型，QR_STR_SCENE为临时的字符串参数值
     * @date: 2021/12/9 11:32
     */
    public static final String QR_STR_SCENE = "QR_STR_SCENE";

    /**
     * 二维码类型，QR_LIMIT_SCENE为永久的整型参数值
     * @date: 2021/12/9 11:33
     */
    public static final String QR_LIMIT_SCENE = "QR_LIMIT_SCENE";

    /**
     * 二维码类型，QR_LIMIT_STR_SCENE为永久的字符串参数值
     * @date: 2021/12/9 11:33
     */
    public static final String QR_LIMIT_STR_SCENE = "QR_LIMIT_STR_SCENE";

    public static final Integer RESULT_SUCCESS_CODE = 0;

    public static final Integer QR_EXPIRE_SECONDS = 2592000;

    /**
     * 微信会员开卡通知模板ID
     * @date: 2021/12/9 18:17
     */
    public static final String VIP_CARD_SUCCESS_TEMPLATE_ID = "Hf_WLVwVAc0HD4KV2_zLD0vTgiw4jpZ-OkcN4lIffUA";

    /**
     * 会员卡余额变动通知模板ID
     * @date: 2021/12/9 18:19
     */
    public static final String VIP_BALANCE_CHANGE_TEMPLATE_ID = "GNwluamISkPhGQU-NC1uBH-ftb7z28rknYe7hZyDKyI";
}
