package com.liquidnet.service.adam.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AdamWechatConst {
    /* =============================================================== ｜ 变量配置 */
    public static String zhengzaiAppletAppid;
    public static String zhengzaiAppletSecret;
    public static String zhengzaiServiceAppid;
    public static String zhengzaiServiceSecret;

    /* =============================================================== ｜ API常量配置 */

    public static final String API_URL_JS_CODE2SESSION = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code";
    public static final String API_URL_OAUTH2_ACCESS_TOKEN = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";

    /* =============================================================== ｜  */



    /* =============================================================== ｜  */

    @Value("${liquidnet.wechat.zhengzai.applet.appid}")
    public void setZhengzaiAppletAppid(String zhengzaiAppletAppid) {
        AdamWechatConst.zhengzaiAppletAppid = zhengzaiAppletAppid;
    }

    @Value("${liquidnet.wechat.zhengzai.applet.secret}")
    public void setZhengzaiAppletSecret(String zhengzaiAppletSecret) {
        AdamWechatConst.zhengzaiAppletSecret = zhengzaiAppletSecret;
    }

    @Value("${liquidnet.wechat.zhengzai.service.appid}")
    public void setZhengzaiServiceAppid(String zhengzaiServiceAppid) {
        AdamWechatConst.zhengzaiServiceAppid = zhengzaiServiceAppid;
    }

    @Value("${liquidnet.wechat.zhengzai.service.secret}")
    public void setZhengzaiServiceSecret(String zhengzaiServiceSecret) {
        AdamWechatConst.zhengzaiServiceSecret = zhengzaiServiceSecret;
    }
}
