package com.fjhx.victoriatourist.service.jd.constants;

import cn.hutool.extra.spring.SpringUtil;

/**
 * 运行参数静态配置
 * @author hj
 */
public class RunParamConstant {
    public static final String DOMAIN = "http://www.victoriatourist.ltd/prod-api";
    public static final String redirect_uri = DOMAIN + "/open/jd/callback";
    public static final String tenantId = "prod".equals(SpringUtil.getActiveProfile()) ? "wdly" : "wdlytest";

    public static final String ACCESS_TOKEN = "access_token";
    public static final String REFRESH_TOKEN = "refresh_token";

    public static final Integer SLEEP_TEN_SECOND = 10000;
    public static final Integer SLEEP_ONE_MINUTE = 60000;

    /**刷新token地址**/
    public static final String JD_REFRESH_URL = "https://open-oauth.jd.com/oauth2/refresh_token?app_key=%s&app_secret=%s&grant_type=refresh_token&refresh_token=%s";
    /**通过code获取token地址**/
    public static final String JD_GET_ACCESS_TOKEN_URL = "https://open-oauth.jd.com/oauth2/access_token?app_key=%s&app_secret=%s&grant_type=authorization_code&code=%s";
    /**登录获取code地址**/
    public static final String JD_LOGIN_URL = "https://open-oauth.jd.com/oauth2/to_login?app_key=%s&response_type=code&redirect_uri=%s&state=%s&scope=snsapi_base";
}
