package com.stylefeng.guns.modular.system.util.qianyuntong;
|
|
import lombok.Data;
|
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* @author zhibing.pu
|
* @Date 2025/7/8 11:31
|
*/
|
@Data
|
@Component
|
public class QianYunTongConfig {
|
|
@Value("${spring.profiles.active}")
|
private String activeProfile;
|
|
|
/**
|
* appkey
|
*/
|
private String appkey;
|
/**
|
* 私钥地址
|
*/
|
private String privateKeyPath;
|
/**
|
* 消费者账号
|
*/
|
private String userName;
|
/**
|
* 状态
|
* 1:生产环境
|
* 2:测试环境
|
*/
|
private String status;
|
/**
|
* API地址
|
*/
|
private String apiUrl;
|
/**
|
* 桶名
|
*/
|
private String bucketName;
|
/**
|
* 小程序appId
|
*/
|
private String appId;
|
/**
|
* HOS的基础路径(公共前缀)
|
*/
|
private String endPoint;
|
/**
|
* 账户的ID
|
*/
|
private String account;
|
/**
|
* 向UAAS服务请求到的access_key
|
*/
|
private String accessKey;
|
/**
|
* 向UAAS服务请求到的secret_key
|
*/
|
private String secretKey;
|
|
|
public QianYunTongConfig getQianYunTongConfig() {
|
if("dev".equals(activeProfile)){
|
this.appkey = "10001104";
|
this.privateKeyPath = "C:\\Users\\Administrator\\Desktop\\private_key_test.pem";
|
this.userName = "xiaofei";
|
this.status = "1";
|
this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
|
this.setBucketName("bucuTest0625");
|
this.setAppId("wxcc3c9058e2b294db");
|
this.setEndPoint("http://119.4.112.68:27741/v1");
|
this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
|
this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
|
this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
|
}
|
if("test".equals(activeProfile)){
|
this.setAppkey("10001104");
|
this.setPrivateKeyPath("/root/server/app/key/private_key_test.pem");
|
this.setUserName("xiaofei");
|
this.setStatus("1");
|
this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
|
this.setBucketName("bucuTest0625");
|
this.setAppId("wxcc3c9058e2b294db");
|
this.setEndPoint("http://119.4.112.68:27741/v1");
|
this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
|
this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
|
this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
|
}
|
if("prod".equals(activeProfile)){
|
this.setAppkey("10001104");
|
this.setPrivateKeyPath("/root/server/app/key/private_key.pem");
|
this.setUserName("xiwang");
|
this.setStatus("1");
|
this.setApiUrl("http://jjzhongtai.stqcloud.com:10010");
|
this.setBucketName("qyt20250702");
|
this.setAppId("wxcc3c9058e2b294db");
|
this.setEndPoint("http://119.4.112.68:27741/v1");
|
this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
|
this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
|
this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
|
}
|
return this;
|
}
|
|
}
|