package com.flossom.miniProgram.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * 微信配置
 *
 * @author flossom
 */
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "wx.config")
public class WxConfig {

    /**
     * 微信公众号 appid
     */
    private String officialAccountAppid;

    /**
     * 微信公众号 appKey
     */
    private String officialAccountAppSecret;

    /**
     * jscode2session
     * 通过 code 去微信服务器换取 openid 和 session_key
     */
    private String loginUrl;

    /**
     * 通过 code 去微信服务器换取 手机号码
     */
    private String obtainPhoneUrl;

    private String accessTokenUrl;

    private String obtainWxOfficialAccountUserUrl;

    private String ObtainUserInfoByOpenidUrl;


    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    public String getObtainPhoneUrl() {
        return obtainPhoneUrl;
    }

    public void setObtainPhoneUrl(String obtainPhoneUrl) {
        this.obtainPhoneUrl = obtainPhoneUrl;
    }

    public String getAccessTokenUrl() {
        return accessTokenUrl;
    }

    public void setAccessTokenUrl(String accessTokenUrl) {
        this.accessTokenUrl = accessTokenUrl;
    }

    public String getObtainWxOfficialAccountUserUrl() {
        return obtainWxOfficialAccountUserUrl;
    }

    public void setObtainWxOfficialAccountUserUrl(String obtainWxOfficialAccountUserUrl) {
        this.obtainWxOfficialAccountUserUrl = obtainWxOfficialAccountUserUrl;
    }

    public String getObtainUserInfoByOpenidUrl() {
        return ObtainUserInfoByOpenidUrl;
    }

    public void setObtainUserInfoByOpenidUrl(String obtainUserInfoByOpenidUrl) {
        ObtainUserInfoByOpenidUrl = obtainUserInfoByOpenidUrl;
    }

    public String getOfficialAccountAppid() {
        return officialAccountAppid;
    }

    public void setOfficialAccountAppid(String officialAccountAppid) {
        this.officialAccountAppid = officialAccountAppid;
    }

    public String getOfficialAccountAppSecret() {
        return officialAccountAppSecret;
    }

    public void setOfficialAccountAppSecret(String officialAccountAppSecret) {
        this.officialAccountAppSecret = officialAccountAppSecret;
    }
}
