xuhy
5 天以前 89351ad17c81b37495f21d4dfbf28f0d306a155a
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
package com.ruoyi.admin.utils;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.admin.entity.IamConfig;
import com.ruoyi.admin.service.IamConfigService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.redis.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
 
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;
import java.util.concurrent.TimeUnit;
 
@Slf4j
@Component
public class PrivateNumberUtil {
 
    @Autowired
    private RedisService redisService;
    @Autowired
    private IamConfigService iamConfigService;
 
    private final String TOKEN_URL = "https://iam.cn-south-1.myhuaweicloud.com/v3/auth/tokens";
    private final String UPLOAD_NUMBER_FILE_URL = "https://rtc.cn-north-1.myhuaweicloud.com/v1/privatenumber/a-number/files?agree_authorization_statement=true";
    private final String ADD_A_NUMBER_URL = "https://rtc.cn-north-1.myhuaweicloud.com/v1.0/privatenumber/a-number?agree_authorization_statement=true";
 
    /**
     * 获取token
     * @return
     */
    public String getToken() {
        String token = redisService.getCacheObject("PRIVATE_NUMBER:");
        if(StringUtils.hasLength(token)){
            return token;
        }
        IamConfig iamConfig = iamConfigService.getById(1);
        String userName = iamConfig.getUserName();
        String account = iamConfig.getAccount();
        String password = iamConfig.getPassword();
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        MediaType mediaType = MediaType.parse("text/plain");
        RequestBody body = RequestBody.create(mediaType, "{\"auth\":{\"identity\":{\"methods\":[\"password\"],\"password\":{\"user\":{\"domain\":{\"name\":\""+userName+"\"},\"name\":\""+account+"\",\"password\":\""+password+"\"}}},\"scope\":{\"domain\":{},\"project\":{\"name\":\"cn-north-1\"}}}}");
        Request request = new Request.Builder()
                .url(TOKEN_URL)
                .method("POST", body)
                .build();
        Response response = null;
        try {
            response = client.newCall(request).execute();
        } catch (IOException e) {
            throw new ServiceException(e.getMessage());
        }
        // 获取响应头 X-Subject-Token
        token = response.header("X-Subject-Token");
        if(StringUtils.hasLength(token)){
            ResponseBody responseBody = response.body();
            if(responseBody != null) {
                try {
                    String string = responseBody.string();
                    log.info("获取token:{}",string);
                    JSONObject jsonObject = JSONObject.parseObject(string);
                    JSONObject tokenJson = jsonObject.getJSONObject("token");
                    // 2025-10-23T07:27:59.224000Z
                    String expiresAt = tokenJson.getString("expires_at");
                    // 将字符串解析为Instant
                    Instant instant = Instant.parse(expiresAt);
                    // 转换为Date
                    Date date = Date.from(instant);
//                    String replace = expiresAt.substring(0, expiresAt.lastIndexOf(".")).replace("T", " ");
//                    Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(replace);
                    redisService.setCacheObject("PRIVATE_NUMBER:",token,date.getTime()-System.currentTimeMillis(), TimeUnit.MILLISECONDS);
                } catch (IOException e) {
                    throw new ServiceException(e.getMessage());
                }
            }
            return token;
        }else {
            return null;
        }
    }
    /**
     * 获取token
     * @return
     */
    public static String getTokenTest() {
        String account = "hsg13437173440";
        String userName = "denglu";
        String password = "6!JR8Fn0";
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        MediaType mediaType = MediaType.parse("text/plain");
        RequestBody body = RequestBody.create(mediaType, "{\"auth\":{\"identity\":{\"methods\":[\"password\"],\"password\":{\"user\":{\"domain\":{\"name\":\""+account+"\"},\"name\":\""+userName+"\",\"password\":\""+password+"\"}}},\"scope\":{\"domain\":{},\"project\":{\"name\":\"cn-north-1\"}}}}");
        Request request = new Request.Builder()
                .url("https://iam.cn-south-1.myhuaweicloud.com/v3/auth/tokens")
                .method("POST", body)
                .build();
        Response response = null;
        try {
            response = client.newCall(request).execute();
        } catch (IOException e) {
            throw new ServiceException(e.getMessage());
        }
        // 获取响应头 X-Subject-Token
        String token = response.header("X-Subject-Token");
        if(StringUtils.hasLength(token)){
            return token;
        }else {
            return null;
        }
    }
 
 
    /**
     * 上传号码文件
     * @param filePath
     */
    public R<String> uploadNumberFile(String filePath) {
        MultipartFile file = UrlToMultipartFileUtil.urlTransferMultipartFile(filePath);
        MultipartFile[] files = new MultipartFile[]{file};
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        // 构建multipart/form-data请求体
        MultipartBody.Builder builder = new MultipartBody.Builder();
        builder.setType(MultipartBody.FORM);
        // 添加文件到请求体
        try {
            for (MultipartFile multipartFile : files) {
                if (multipartFile != null && !multipartFile.isEmpty()) {
                    RequestBody fileBody = RequestBody.create(
                            MediaType.parse(multipartFile.getContentType()),
                            multipartFile.getBytes()
                    );
                    builder.addFormDataPart("files", multipartFile.getOriginalFilename(), fileBody);
                    System.err.println("文件名称+"+multipartFile.getOriginalFilename());
                }
            }
        } catch (IOException e) {
            System.err.println("Error reading multipart file: " + e.getMessage());
            e.printStackTrace();
            return R.fail("文件读取失败: " + e.getMessage());
        }
        RequestBody body = builder.build();
        Request request = new Request.Builder()
                .url(UPLOAD_NUMBER_FILE_URL)
                .method("POST", body)
                .addHeader("X-Auth-Token", getToken())
                .build();
        Response response = null;
        try {
            response = client.newCall(request).execute();
            ResponseBody responseBody = response.body();
            if(responseBody != null) {
                try {
                    String string = responseBody.string();
                    log.info("上传号码文件:{}",string);
                    JSONObject jsonObject = JSONObject.parseObject(string);
                    String result = jsonObject.getString("result");
                    if("Upload Successful.".equals(result)){
                        System.err.println("返回的文件名称+"+file.getOriginalFilename());
                        return R.ok(file.getOriginalFilename(),"");
                    }else {
                        String failReason = jsonObject.getString("failReason");
                        return R.fail(failReason);
                    }
                } catch (IOException e) {
                    throw new ServiceException(e.getMessage());
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return R.fail();
    }
    public static R uploadNumberFileTest(String filePath,String accessToken) {
        MultipartFile file = UrlToMultipartFileUtil.urlTransferMultipartFile(filePath);
        MultipartFile[] files = new MultipartFile[]{file};
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        // 构建multipart/form-data请求体
        MultipartBody.Builder builder = new MultipartBody.Builder();
        builder.setType(MultipartBody.FORM);
        // 添加文件到请求体
        try {
            for (MultipartFile multipartFile : files) {
                if (multipartFile != null && !multipartFile.isEmpty()) {
                    RequestBody fileBody = RequestBody.create(
                        MediaType.parse(multipartFile.getContentType()),
                        multipartFile.getBytes()
                    );
                    builder.addFormDataPart("files", multipartFile.getOriginalFilename(), fileBody);
                }
            }
        } catch (IOException e) {
            System.err.println("Error reading multipart file: " + e.getMessage());
            e.printStackTrace();
            return R.fail("文件读取失败: " + e.getMessage());
        }
        RequestBody body = builder.build();
        Request request = new Request.Builder()
                .url("https://rtc.cn-north-1.myhuaweicloud.com/v1/privatenumber/a-number/files?agree_authorization_statement=true")
                .method("POST", body)
                .addHeader("X-Auth-Token", getTokenTest())
                .build();
        Response response = null;
        try {
            response = client.newCall(request).execute();
            ResponseBody responseBody = response.body();
            if(responseBody != null) {
                try {
                    String string = responseBody.string();
                    System.err.println("body:::::::::::::::::"+string);
                    JSONObject jsonObject = JSONObject.parseObject(string);
                    String result = jsonObject.getString("result");
                    if("Upload Successful.".equals(result)){
                        return R.ok();
                    }else {
                        String failReason = jsonObject.getString("failReason");
                        return R.fail(failReason);
                    }
                } catch (IOException e) {
                    throw new ServiceException(e.getMessage());
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return R.fail();
    }
 
    /**
     * 新增租户级 A 号码报备接口
     * @param fileName
     */
    public R addANumber(String number, String realName, String idNumber, String fileName) {
        JSONObject requestBody = new JSONObject();
        JSONArray numbers = new JSONArray();
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("number", "+86"+number); // 手机号码
        jsonObject.put("numberType", 1); // 号码类型 1=手机号 2=固话
        jsonObject.put("name", realName); // 真实姓名
        jsonObject.put("identityCard",idNumber); // 身份证号
        jsonObject.put("liveFaceImage", fileName); // 号码所属人现场照片文件名
        numbers.add(jsonObject);
        requestBody.put("numbers", numbers);
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        // 构建json请求体
        MediaType mediaType = MediaType.parse("application/json");
        String requestBodyJson = requestBody.toJSONString();
        RequestBody body = RequestBody.create(mediaType, requestBodyJson);
        Request request = new Request.Builder()
                .url(ADD_A_NUMBER_URL)
                .method("POST", body)
                .addHeader("X-Auth-Token", getToken())
                .addHeader("Content-Type", "application/json")
                .addHeader("Accept", "application/json")
                .build();
        Response response = null;
        try {
            response = client.newCall(request).execute();
            ResponseBody responseBody = response.body();
            if(responseBody != null) {
                String string = responseBody.string();
                log.info("新增租户级 A 号码报备接口:{}",string);
                // 解析响应JSON
                JSONObject responseJson = JSONObject.parseObject(string);
                String result = responseJson.getString("result");
                if("Add Successful.".equals(result)){
                    return R.ok();
                }else {
                    String errorMsg = responseJson.getString("error_msg");
                    return R.fail(errorMsg);
                }
            }
        } catch (IOException e) {
            throw new ServiceException(e.getMessage());
        }
        return R.fail();
    }
    public static R addANumberTest(String number, String realName, String idNumber, String fileName) {
        JSONObject requestBody = new JSONObject();
        JSONArray numbers = new JSONArray();
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("number", "+86"+number); // 手机号码
        jsonObject.put("numberType", 1); // 号码类型 1=手机号 2=固话
        jsonObject.put("name", realName); // 真实姓名
        jsonObject.put("identityCard",idNumber); // 身份证号
        jsonObject.put("liveFaceImage", fileName); // 号码所属人现场照片文件名
        numbers.add(jsonObject);
        requestBody.put("numbers", numbers);
        OkHttpClient client = new OkHttpClient().newBuilder()
                .build();
        // 构建json请求体
        MediaType mediaType = MediaType.parse("application/json");
        String requestBodyJson = requestBody.toJSONString();
        RequestBody body = RequestBody.create(mediaType, requestBodyJson);
        Request request = new Request.Builder()
                .url("https://rtc.cn-north-1.myhuaweicloud.com/v1.0/privatenumber/a-number?agree_authorization_statement=true")
                .method("POST", body)
                .addHeader("X-Auth-Token", getTokenTest())
                .addHeader("Content-Type", "application/json")
                .addHeader("Accept", "application/json")
                .build();
        Response response = null;
        try {
            response = client.newCall(request).execute();
            ResponseBody responseBody = response.body();
            if(responseBody != null) {
                String string = responseBody.string();
                log.info("新增租户级 A 号码报备接口:{}",string);
                System.err.println("body:::::::::::::::::+++++++++++"+string);
                // 解析响应JSON
                JSONObject responseJson = JSONObject.parseObject(string);
                String result = responseJson.getString("result");
                if("Add Successful.".equals(result)){
                    return R.ok();
                }else {
                    String errorMsg = responseJson.getString("error_msg");
                    return R.fail(errorMsg);
                }
            }
        } catch (IOException e) {
            throw new ServiceException(e.getMessage());
        }
        return R.fail();
    }
 
    public static void main(String[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2kCCQDcsytdEGFqEDALBglghkgBZQMEAgEwDQYJKoZIhvcNAQEBBQAEggEAbtVzZi6mqzlm1pyXLoQK2jNhfm5hqnjO8LrWK5FK1rtWpQU8ouEFJBfUDor6kcJpetMnf8fnpJF9Lmd+rT8N5-39Cpdr831ooUJufWIzBSt8Y+N+IoFUpQd-Ut5PRl0YpGWf90015EHcY-hhJk6rW-URTPXwC57f8CGkd3gOF7PPlv9TzIYtyjpCCjJah2kGjqfogYIQ9l1EBsZQplYd5OaYaH-dvxFBA8tlNteaEWGRAfhqsu6bbMVXlFG0VwlnQdUFvR6N7dUytmgKxaaHjyH2KUuGwgh6ELevfnYyqoYk-UAarnr3MbrnpmfcL7z3D-4aBOSTmXIOIHFkFRiUCQ==";
        R r = uploadNumberFileTest("https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/38878509-00b7-4fb2-9c3a-b53d8161d84a.jpg","");
//        System.err.println(r.getMsg());
//        String tokenTest = getTokenTest();
//        System.err.println(tokenTest);
//        R r = addANumberTest("17828262728", "刘杰", "511028200002150816", "avatar6278474701910805124b53d8161d84a.jpg");
//        System.err.println(r.getMsg());
    }
}