package com.ruoyi.common.constant;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Configuration
@Component
public class AliKeyConfig implements InitializingBean {

    @Value("${ali.accessKeyId}")
    public String accessKeyId;

    @Value("${ali.accessKeySecret}")
    public String accessKeySecret;

    @Value("${umApp.appAliKey}")
    public String umAppAliKey;

    @Value("${umApp.appAliSecret}")
    public String umAppAliSecret;


    @Value("${umApp.androidKey}")
    public String umAppAndroidKey;

    @Value("${umApp.IOSKey}")
    public String umAppIOSKey;


    // 终端ID
    public static String ACCESS_KEY_ID;

    public static String ACCESS_KEY_SECRET;

    public static String UMApp_Android_Key;

    public static String UMApp_IOS_Key;

    public static  String UMApp_AliKey;

    public static  String UMApp_AliSecret;

    @Override
    public void afterPropertiesSet() {
        ACCESS_KEY_ID = this.accessKeyId;
        ACCESS_KEY_SECRET = this.accessKeySecret;
        UMApp_Android_Key = this.umAppAndroidKey;
        UMApp_IOS_Key = this.umAppIOSKey;
        UMApp_AliKey = this.umAppAliKey;
        UMApp_AliSecret = this.umAppAliSecret;
    }


}
