liujie
9 天以前 a8895e0ce4d03c9a50ad0196bb4ddc6dd642cd34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
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
 */
@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 String getActiveProfile() {
        return activeProfile;
    }
 
    public void setActiveProfile(String activeProfile) {
        this.activeProfile = activeProfile;
    }
 
    public String getAppkey() {
        return appkey;
    }
 
    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }
 
    public String getPrivateKeyPath() {
        return privateKeyPath;
    }
 
    public void setPrivateKeyPath(String privateKeyPath) {
        this.privateKeyPath = privateKeyPath;
    }
 
    public String getUserName() {
        return userName;
    }
 
    public void setUserName(String userName) {
        this.userName = userName;
    }
 
    public String getStatus() {
        return status;
    }
 
    public void setStatus(String status) {
        this.status = status;
    }
 
    public String getApiUrl() {
        return apiUrl;
    }
 
    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }
 
    public String getBucketName() {
        return bucketName;
    }
 
    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }
 
    public String getAppId() {
        return appId;
    }
 
    public void setAppId(String appId) {
        this.appId = appId;
    }
 
    public String getEndPoint() {
        return endPoint;
    }
 
    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }
 
    public String getAccount() {
        return account;
    }
 
    public void setAccount(String account) {
        this.account = account;
    }
 
    public String getAccessKey() {
        return accessKey;
    }
 
    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }
 
    public String getSecretKey() {
        return secretKey;
    }
 
    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }
 
    public QianYunTongConfig getQianYunTongConfig() {
        if("dev".equals(activeProfile)){
            this.appkey = "10001104";
            this.privateKeyPath = "C:\\Users\\Admin\\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;
    }
    
}