package com.ningdatech.pmapi.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;

/**
 * @description: 浙政钉配置
 * @author: liushuai
 * @date: 2022/5/5 15:10
 */
@Data
@Component
public class GovDingProperties {
    public static String appkey;
    public static String appsecret;
    public static String appAuthkey;
    public static String appAuthsecret;

    public static String appSsoAuthkey;
    public static String appSsoAuthsecret;
    public static Long tenantId;

    public static String domain;

    @Value("${ding.app-key}")
    public void setPrivateKey(String appkey) {
        GovDingProperties.appkey = appkey;
    }

    @Value("${ding.app-secret}")
    public void setAppsecret(String appsecret) {
        GovDingProperties.appsecret = appsecret;
    }

    @Value("${ding.app-auth-key}")
    public void setAppAuthKey(String appAuthkey) {
        GovDingProperties.appAuthkey = appAuthkey;
    }

    @Value("${ding.app-auth-secret}")
    public void setAppAuthsecret(String appAuthsecret) {
        GovDingProperties.appAuthsecret = appAuthsecret;
    }

//    @Value("${ding.app-sso-auth-key}")
//    public void setAppSsoAuthKey(String appSsoAuthkey) {
//        GovDingProperties.appSsoAuthkey = appSsoAuthkey;
//    }
//
//    @Value("${ding.app-sso-auth-secret}")
//    public void setAppSsoAuthsecret(String appSsoAuthsecret) {
//        GovDingProperties.appSsoAuthsecret = appSsoAuthsecret;
//    }

    @Value("${ding.tenantId}")
    public void setTenantId(Long tenantId) {
        GovDingProperties.tenantId = tenantId;
    }
    @Value("${ding.domain}")
    public void setDomain(String domain) {
        GovDingProperties.domain = domain;
    }
}
