duhongyu před 1 měsícem
rodič
revize
1205ebf3d2

+ 64 - 19
ltrq-api/src/main/java/api/controller/HomeController.java

@@ -15,6 +15,7 @@ import api.model.AjaxResult;
15 15
 import api.service.call.ICallLogService;
16 16
 import api.service.call.ITranslateService;
17 17
 import api.service.docking.IDockingService;
18
+import api.service.rasa.IRasaKnowledgeService;
18 19
 import api.service.system.ILogininforService;
19 20
 import api.service.system.IUserRoleService;
20 21
 import api.service.system.IUserService;
@@ -23,6 +24,7 @@ import api.util.annotation.Anonymous;
23 24
 import api.util.constants.CacheConstants;
24 25
 import api.util.helper.*;
25 26
 import com.alibaba.fastjson2.JSON;
27
+import com.alibaba.fastjson2.JSONObject;
26 28
 import com.anji.captcha.model.common.ResponseModel;
27 29
 import com.anji.captcha.model.vo.CaptchaVO;
28 30
 import com.anji.captcha.service.CaptchaService;
@@ -31,6 +33,9 @@ import com.baomidou.mybatisplus.extension.toolkit.SqlRunner;
31 33
 import com.fasterxml.jackson.core.JsonProcessingException;
32 34
 import com.fasterxml.jackson.core.type.TypeReference;
33 35
 import com.fasterxml.jackson.databind.ObjectMapper;
36
+import com.google.gson.Gson;
37
+import com.google.gson.JsonObject;
38
+import com.google.gson.JsonParser;
34 39
 import io.swagger.annotations.Api;
35 40
 import io.swagger.annotations.ApiOperation;
36 41
 import lombok.extern.slf4j.Slf4j;
@@ -71,6 +76,8 @@ public class HomeController extends BaseController {
71 76
 
72 77
     @Autowired
73 78
     private IUserRoleService userRoleService;
79
+    @Autowired
80
+    private IRasaKnowledgeService rasaKnowledgeService;
74 81
 
75 82
 
76 83
     @Autowired
@@ -131,29 +138,31 @@ public class HomeController extends BaseController {
131 138
         if (list == null) {
132 139
             return Error("导入失败");
133 140
         }
134
-        for (int i=1;i <=30;i++)
135
-        {
136
-            TtsHelper.TextToSpeech("你当前的位置为"+i, String.valueOf(i));
137
-        }
141
+//        TtsHelper.TextToSpeech("欢迎致电蓝天燃气语音客服中心 为了确保服务质量 您的通话将被录音", "hyc");
142
+//
143
+//        TtsHelper.TextToSpeech("您好 请问有什么可以帮您?", "robot");
144
+//
145
+//        TtsHelper.TextToSpeech("别着急,说得详细一点,我才能帮到您。", "shgd");
146
+//
147
+//        TtsHelper.TextToSpeech("检测到您的问题较为复杂,为提供精准服务现为您转接人工坐席。转接中,请稍候。", "zjrg");
148
+//
149
+//        TtsHelper.TextToSpeech("可通过“河南蓝天燃气”微信公众号,燃气营业厅,或者拨打4000678099/4000693666,24小时服务热线进行登记,由设计人员勘察现场后出方案。", "2");
150
+//        TtsHelper.TextToSpeech("请您先把窗户和门打开,不要使用燃气。我将尽快为您转接人工", "33");
138 151
 
139
-        for (int i=1000;i <=1030;i++)
140
-        {
141
-            TtsHelper.TextToSpeech("你好,"+ String.valueOf(i).replaceAll("(.)", " $1").substring(1) +"号话务员正在为你服务", String.valueOf(i));
142
-        }
143
-     //   redisHelper.setCache("DocExcel",JSON.toJSONString(list));
144
-//        for (KnowledgeExcel item :list)
145
-//        {
146
-//            String filename=item.getEncoding();
147 152
 //
148 153
 //
149
-//            String parentPath = "files/audio/2025-10-14";
150
-//            File files = new File(parentPath+"/"+filename+".wav");
151
-//            if (files.exists()) {
152
-//                continue;
153
-//            }
154
-//            TtsHelper.TextToSpeech(item.getContent(), filename);
155
-//            System.out.println(filename);
154
+//
155
+//        for (int i=1000;i <=1030;i++)
156
+//        {
157
+//            TtsHelper.TextToSpeech("你好,"+ String.valueOf(i).replaceAll("(.)", " $1").substring(1) +"号话务员正在为你服务", String.valueOf(i));
156 158
 //        }
159
+      //  redisHelper.setCache("DocExcel",JSON.toJSONString(list));
160
+        for (KnowledgeExcel item :list)
161
+        {
162
+            String filename=item.getEncoding();
163
+            TtsHelper.TextToSpeech(item.getContent(), filename);
164
+            System.out.println(filename);
165
+        }
157 166
         return Success("成功", list);
158 167
     }
159 168
     @ApiOperation("导出Excel")
@@ -283,6 +292,42 @@ public class HomeController extends BaseController {
283 292
     }
284 293
 
285 294
 
295
+    @ApiOperation("登录")
296
+    @PostMapping("/byUserLogin")
297
+    public AjaxResult Login(@RequestParam String token) throws Exception {
298
+        try {
299
+            // 发送请求并获取结果
300
+            String response = HttpHelper.sendGetRequest("https://lt.lantian-life.com/api/byTokenGetUserInfo",token);
301
+            // 使用 Gson 解析
302
+            Gson gson = new Gson();
303
+            JsonObject jsonObject = JsonParser.parseString(response).getAsJsonObject();
304
+            // 获取 status
305
+            int status = jsonObject.get("status").getAsInt();
306
+            boolean isDataEmpty = jsonObject.get("data").isJsonNull();
307
+            // 业务逻辑
308
+            if (status == 200) {
309
+                if (!isDataEmpty) {
310
+                    List<Long> roleids =new ArrayList<>();
311
+                    roleids.add(20L);
312
+                    Map<String, Object> cls = new HashMap<>();
313
+                    cls.put("UserId", 57);
314
+                    cls.put("RoleIds", roleids);
315
+                    String basetoken = JwtHelper.createToken(cls);
316
+                    Map<String, Object> data = new HashMap<>();
317
+                    data.put("token", basetoken);
318
+                    return Success("登录成功", data);
319
+                }
320
+            } else {
321
+                String msg = jsonObject.get("msg").getAsString();
322
+                System.out.println("错误信息: " + msg);
323
+            }
324
+
325
+        } catch (IOException e) {
326
+            e.printStackTrace();
327
+        }
328
+        return Error("token 错误");
329
+
330
+    }
286 331
 
287 332
     @ApiOperation("退出")
288 333
     @PostMapping("/logout")

+ 34 - 1
ltrq-api/src/main/java/api/controller/docking/DockingController.java

@@ -53,7 +53,6 @@ public class DockingController extends BaseController {
53 53
     @ApiOperation("请求接口")
54 54
     @Log(title = "请求接口",businessType = BusinessType.QUERY)
55 55
     @PostMapping("/docking")
56
-    @Anonymous
57 56
     public  AjaxResult  docking(@RequestBody dockingInput input) throws Exception {
58 57
 //        if (Objects.equals(input.getUrl(), "http://192.168.16.31:8301/enesysapi/rest/v1/charging/querypayrecord"))
59 58
 //        {
@@ -138,6 +137,40 @@ public class DockingController extends BaseController {
138 137
             return  Success("获取成功",json);
139 138
         }
140 139
     }
140
+    @ApiOperation("查询预约记录列表")
141
+    @Log(title = "查询预约记录列表",businessType = BusinessType.QUERY)
142
+    @PostMapping("/queryListByConditioin")
143
+    public  AjaxResult  queryListByConditioin(@RequestBody dockingInput input) {
144
+
145
+
146
+        String jsonBody="{";
147
+        if(StringHelper.isNotEmpty(input.getUserNo()))
148
+        {
149
+            jsonBody+="\"userNo\":\""+input.getUserNo()+"\"";
150
+        }
151
+        if(StringHelper.isNotEmpty(input.getUserPhone()))
152
+        {
153
+            jsonBody+="\"userPhone\":\""+input.getUserPhone()+"\"";
154
+        }
155
+        if(StringHelper.isNotEmpty(input.getUserName()))
156
+        {
157
+            jsonBody+="\"userName\":\""+input.getUserName()+"\"";
158
+        }
159
+        if(StringHelper.isNotEmpty(input.getStartDate()))
160
+        {
161
+            jsonBody+=(",\"startDate\":\""+input.getStartDate()+"\"");
162
+        }
163
+        if(StringHelper.isNotEmpty(input.getEndDate()))
164
+        {
165
+            jsonBody+=(",\"endDate\":\""+input.getEndDate()+"\"");
166
+        }
167
+        jsonBody+="}";
168
+
169
+        var json= dockingService.queryListByConditioin(jsonBody);
170
+        return  Success("获取成功",json);
171
+    }
172
+
173
+
141 174
     @ApiOperation("筛选条件")
142 175
     @Log(title = "筛选条件",businessType = BusinessType.QUERY)
143 176
     @GetMapping("/option")

+ 1 - 1
ltrq-api/src/main/resources/application-production.yml

@@ -42,7 +42,7 @@ spring:
42 42
   isNote: 0
43 43
   pushUrl: 192.168.16.58:8160/Home/receiveCall
44 44
   curlUrl: http://192.168.16.58:8160/
45
-  middlewareUrl: http://192.168.16.56:9000/
45
+  middlewareUrl: http://192.168.16.58:9000/
46 46
   milvusclient:
47 47
     host: 192.168.16.59
48 48
     port: 19530

+ 4 - 0
ltrq-entity/src/main/java/api/entity/input/docking/dockingInput.java

@@ -15,6 +15,10 @@ public class dockingInput {
15 15
     private String userNo;
16 16
     @ApiModelProperty("工单号")
17 17
     private String woId;
18
+    @ApiModelProperty("手机号")
19
+    private String userPhone;
20
+    @ApiModelProperty("用户姓名")
21
+    private String userName;
18 22
     @ApiModelProperty("开始时间")
19 23
     private String startDate;
20 24
     @ApiModelProperty("结束时间")

+ 2 - 0
ltrq-service/src/main/java/api/service/docking/IDockingService.java

@@ -20,4 +20,6 @@ public interface IDockingService {
20 20
 
21 21
     // 执行POST请求
22 22
     String doPost( String jsonBody,String Url) throws Exception;
23
+
24
+    String queryListByConditioin(String jsonBody);
23 25
 }

+ 92 - 0
ltrq-service/src/main/java/api/service/docking/impl/DockingServiceImpl.java

@@ -38,6 +38,12 @@ public class DockingServiceImpl implements IDockingService {
38 38
     private IPatientService patientService;
39 39
     private final String appId="hujiao";
40 40
     private final String appSecret="huJiaoEslink";
41
+
42
+   // private final String eslinkappId="OTHER65NFaz6AFzjpP3WR";
43
+  //  private final String eslinkappSecret="Nt7dH8XZ5QDkQramwABMeNxyYpdtDAkd";
44
+
45
+    private final String eslinkappId="OTHER6QG5Kr5S8QECE4jA";
46
+    private final String eslinkappSecret="xwzy2GbkStZyMimKKyxBKNns7mcrkQc4";
41 47
     // 生成时间戳
42 48
     private String generateTimestamp() {
43 49
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
@@ -480,4 +486,90 @@ public class DockingServiceImpl implements IDockingService {
480 486
         return  response.toString();
481 487
     }
482 488
 
489
+    /**
490
+     * Base64编码
491
+     */
492
+    public static String base64Encode(String input) {
493
+        return Base64.getEncoder().encodeToString(input.getBytes(StandardCharsets.UTF_8));
494
+    }
495
+
496
+    /**
497
+     * 查询预约列表
498
+     * @return 是否请求成功
499
+     */
500
+    @Override
501
+    public String queryListByConditioin(String jsonBody) {
502
+        HttpURLConnection connection = null;
503
+        BufferedReader reader = null;
504
+
505
+        try {
506
+            // 构建URL
507
+
508
+           // String apiUrl =  "http://cloudselfhelp-gateway.test-new.eslink.net.cn/reserve/queryListByConditioin";
509
+            String apiUrl =  "https://cloudselfhelp-gateway.eslink.com/reserve/queryListByConditioin";
510
+            URL url = new URL(apiUrl);
511
+
512
+            // 创建连接
513
+            connection = (HttpURLConnection) url.openConnection();
514
+            connection.setRequestMethod("POST");
515
+            connection.setDoOutput(true);
516
+            String timestamp = generateTimestamp();
517
+
518
+            // 生成 AccessToken: MD5(appId + appSecret + timestamp)
519
+            String accessTokenContent = eslinkappId + eslinkappSecret + timestamp;
520
+            String accessToken =  SecretHelper.MD5(accessTokenContent);
521
+
522
+            // 生成 Authorization: Base64(appId + ":" + timestamp)
523
+            String authContent = eslinkappId + ":" + timestamp;
524
+            String authorization = base64Encode(authContent);
525
+
526
+            // 设置请求头
527
+            connection.setRequestProperty("Accept", "application/json");
528
+            connection.setRequestProperty("Content-Type", "application/json;charset=utf-8");
529
+            connection.setRequestProperty("AccessToken", accessToken);
530
+            connection.setRequestProperty("Authorization", authorization);
531
+            connection.setRequestProperty("SourceType", "AUTH_HNLTGAS");
532
+            connection.setRequestProperty("UserTicket", "PLAT_002");
533
+
534
+            // 发送请求体
535
+            try (OutputStream os = connection.getOutputStream()) {
536
+                byte[] input = jsonBody.getBytes(StandardCharsets.UTF_8);
537
+                os.write(input, 0, input.length);
538
+            }
539
+            BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
540
+            String inputLine;
541
+            StringBuilder response = new StringBuilder();
542
+
543
+            while ((inputLine = in.readLine()) != null) {
544
+                response.append(inputLine);
545
+            }
546
+            in.close();
547
+
548
+            return  response.toString();
549
+
550
+        } catch (Exception e) {
551
+            System.err.println("请求异常: " + e.getMessage());
552
+            e.printStackTrace();
553
+            return e.getMessage();
554
+        } finally {
555
+            // 清理资源
556
+            try {
557
+                if (reader != null) reader.close();
558
+                if (connection != null) connection.disconnect();
559
+            } catch (Exception e) {
560
+                e.printStackTrace();
561
+            }
562
+        }
563
+    }
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+
483 575
 }

+ 113 - 22
ltrq-service/src/main/java/api/service/websocket/WebSocket.java

@@ -9,6 +9,7 @@ import api.entity.view.online.MessageView;
9 9
 import api.service.dify.IDifyAssistantService;
10 10
 import api.service.online.IMessageService;
11 11
 import api.service.patient.IPatientService;
12
+import api.service.sf.ISfPlanService;
12 13
 import api.service.system.IConfigService;
13 14
 import api.util.enums.PatientSource;
14 15
 import api.util.helper.*;
@@ -40,12 +41,9 @@ public class WebSocket {
40 41
     private IMessageService messageService;
41 42
     @Autowired
42 43
     private IPatientService patientService;
43
-    @Autowired
44
-    private IDifyAssistantService difyAssistantService;
44
+
45 45
     @Autowired
46 46
     private WxMpService wxMpService;
47
-    @Autowired
48
-    private IConfigService configService;
49 47
 
50 48
     private static WebSocket webSocket;
51 49
 
@@ -91,11 +89,11 @@ public class WebSocket {
91 89
                     customers.put(userCode, source);
92 90
                     khsessionPool.put(userCode, session);
93 91
                     Long pid = null;
94
-                    List<String> ps = session.getRequestParameterMap().get("project");
95
-                    if(ps!=null&&ps.size()>0)
96
-                    {
97
-                        pid = Long.valueOf(ps.get(0));
98
-                    }
92
+                   // List<String> ps = session.getRequestParameterMap().get("project");
93
+//                    if(ps!=null&&ps.size()>0)
94
+//                    {
95
+//                        pid = Long.valueOf(ps.get(0));
96
+//                    }
99 97
                     addCustomer(userCode, source, pid);
100 98
                 }
101 99
             }
@@ -214,25 +212,59 @@ public class WebSocket {
214 212
 
215 213
                 if (!exist) {
216 214
                     session.getAsyncRemote().sendText(JSON.toJSONString(mv1));
217
-                    return;
218 215
                 }
216
+                webSocket.messageService.insert(msg);
219 217
             } else {
220 218
                 //客户发送消息
221 219
                 msg.setSend(1);
222 220
                 msg.setKhUser(userCode);
223 221
                 msg.setKhSource(source);
224 222
                 String kf = khkfs.get(userCode);
223
+              if(content.contains("人工"))
224
+              {
225
+
225 226
                 if (StringHelper.isEmpty(kf)||servicers.get(kf)==2) {
226 227
                     kf = servicerQueue.poll();
227 228
                     if (!StringHelper.isEmpty(kf)) {
228 229
                         servicerQueue.add(kf);
229
-                        khkfs.put(userCode, kf);
230
+                        Session session1 = khsessionPool.get(userCode);
231
+                        if (session1 != null) {
232
+                            msg.setKfUser(kf);
233
+                            webSocket.messageService.insert(msg);
234
+                            MessageView mv1 = new MessageView();
235
+                            mv1.setUser("admin");
236
+                            mv1.setStatus("success");
237
+                            mv1.setType(type);
238
+                            mv1.setContent("正在为您转接人工,请稍后");
239
+                            session1.getAsyncRemote().sendText(JSON.toJSONString(mv1));
240
+                            addMsg(userCode,"正在为您转接人工,请稍后");
241
+                        }
230 242
                     }
231
-                }
243
+                    else
244
+                    {
245
+                        IConfigService configService = SpringHelper.getBean(IConfigService.class);
246
+                        String  answer= configService.getConfigValue("prompt");
247
+                        Session session1 = khsessionPool.get(userCode);
248
+                        if (session1 != null) {
249
+                            MessageView mv1 = new MessageView();
250
+                            mv1.setStatus("success");
251
+                            mv1.setType(type);
252
+                            mv1.setContent(answer);
253
+                            mv1.setUser(userCode);
254
+                            session1.getAsyncRemote().sendText(JSON.toJSONString(mv1));
255
+                        }
256
+                        addMsg(userCode,answer);
257
+                    }
258
+                  }
259
+              }
260
+              else
261
+              {
262
+                  webSocket.messageService.insert(msg);
263
+              }
232 264
                 if (!StringHelper.isEmpty(kf)) {
265
+                    msg.setKfUser(kf);
233 266
                     Session session1 = kfsessionPool.get(kf);
234 267
                     if (session1 != null) {
235
-                        msg.setKfUser(kf);
236 268
                         MessageView mv1 = new MessageView();
237 269
                         mv1.setStatus("success");
238 270
                         mv1.setType(type);
@@ -241,14 +273,74 @@ public class WebSocket {
241 273
                         session1.getAsyncRemote().sendText(JSON.toJSONString(mv1));
242 274
                     }
243 275
                 }
244
-            }
245
-            //webSocket.messageService.insert(msg);
246
-            AsyncHelper.instance().execute(new TimerTask() {
247
-                @Override
248
-                public void run() {
249
-                    webSocket.messageService.insert(msg);
276
+                else
277
+                {
278
+                    if(!content.contains("人工")) {
279
+                        IDifyAssistantService difyAssistantService = SpringHelper.getBean(IDifyAssistantService.class);
280
+                        DifyChatMessagesInput input = new DifyChatMessagesInput();
281
+                        LambdaQueryWrapper<DifyAssistant> qw = new LambdaQueryWrapper<>();
282
+                        qw.eq(DifyAssistant::getCode, "mxyh");
283
+                        DifyAssistant dify = difyAssistantService.getEntity(qw);
284
+                        if (dify != null) {
285
+                            input.setId(dify.getAssistantId());
286
+                            input.setQuery(content);
287
+                            Map<String, Object> conversationMap = conversations.get(userCode);
288
+                            String Conversation_id = "";
289
+                            if (conversationMap != null) {
290
+                                Object Aime = conversationMap.get("conversationAime");
291
+                                Object Id = conversationMap.get("conversationId");
292
+                                if (Aime != null) {
293
+                                    Date time = (Date) conversationMap.get("conversationAime");
294
+                                    // 获取当前时间
295
+                                    Date now = new Date();
296
+                                    // 计算时间差的绝对值(毫秒)
297
+                                    long diffInMilliseconds = Math.abs(now.getTime() - time.getTime());
298
+                                    if (diffInMilliseconds <= (30 * 60 * 1000) && Id != null) {
299
+                                        Conversation_id = Id.toString();
300
+                                    }
301
+                                }
302
+                            }
303
+                            input.setConversation_id(Conversation_id);
304
+                            input.setAuto_generate_name(false);
305
+                            try {
306
+                                String json = difyAssistantService.sendMessages(input, dify, userCode);
307
+                                ObjectMapper mapper = new ObjectMapper();
308
+                                JsonNode rootNode = mapper.readTree(json);
309
+                                String answer = rootNode.get("answer").asText();
310
+                                String conversationId = rootNode.get("conversation_id").asText();
311
+                                if (!conversations.containsKey(userCode)) {
312
+                                    conversations.remove(userCode);
313
+                                    Map<String, Object> conversationsMap = new HashMap<>();
314
+                                    conversationsMap.put("conversationId", conversationId);
315
+                                    conversationsMap.put("conversationAime", new Date());
316
+                                    conversations.put(userCode, conversationsMap);
317
+                                }
318
+                                Session session1 = khsessionPool.get(userCode);
319
+                                if (session1 != null) {
320
+                                    MessageView mv1 = new MessageView();
321
+                                    mv1.setStatus("success");
322
+                                    mv1.setType(type);
323
+                                    mv1.setContent(answer);
324
+                                    mv1.setUser(userCode);
325
+                                    session1.getAsyncRemote().sendText(JSON.toJSONString(mv1));
326
+                                }
327
+                                addMsg(userCode, answer);
328
+
329
+                            } catch (Exception E) {
330
+                            }
331
+
332
+                        }
333
+                    }
250 334
                 }
251
-            });
335
+
336
+            }
337
+          //  webSocket.messageService.insert(msg);
338
+//            AsyncHelper.instance().execute(new TimerTask() {
339
+//                @Override
340
+//                public void run() {
341
+//                    webSocket.messageService.insert(msg);
342
+//                }
343
+//            });
252 344
         }
253 345
     }
254 346
 
@@ -583,8 +675,6 @@ public class WebSocket {
583 675
             String kf = khkfs.get(sendUser);
584 676
 //            if(content.contains("人工"))
585 677
 //            {
586
-//
587
-//
588 678
 //                if (StringHelper.isEmpty(kf)||servicers.get(kf)==2) {
589 679
 //                    kf = servicerQueue.poll();
590 680
 //                    if (!StringHelper.isEmpty(kf)) {
@@ -631,6 +721,7 @@ public class WebSocket {
631 721
             {
632 722
                 if ("text".equals(msgType))
633 723
                 {
724
+                    IDifyAssistantService difyAssistantService= SpringHelper.getBean(IDifyAssistantService.class);
634 725
                     webSocket.messageService.insert(message);
635 726
                     DifyChatMessagesInput input=new DifyChatMessagesInput();
636 727
                     LambdaQueryWrapper<DifyAssistant> qw = new LambdaQueryWrapper<>();

+ 34 - 0
ltrq-util/src/main/java/api/util/helper/HttpHelper.java

@@ -463,6 +463,40 @@ public class HttpHelper {
463 463
         }
464 464
         return result.toString();
465 465
     }
466
+    public static String sendGetRequest(String urlString, String token) throws Exception {
467
+        URL url = new URL(urlString);
468
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
469
+
470
+        // 设置请求方法
471
+        connection.setRequestMethod("GET");
472
+
473
+        // 设置请求头
474
+        connection.setRequestProperty("authori-zation", token);
475
+        connection.setRequestProperty("Content-Type", "application/json");
476
+        connection.setRequestProperty("User-Agent", "Mozilla/5.0");
477
+
478
+        // 设置超时时间
479
+        connection.setConnectTimeout(5000);
480
+        connection.setReadTimeout(5000);
481
+
482
+        // 获取响应码
483
+        int responseCode = connection.getResponseCode();
484
+        System.out.println("响应码: " + responseCode);
485
+
486
+        // 读取响应内容
487
+        BufferedReader in = new BufferedReader(
488
+                new InputStreamReader(connection.getInputStream()));
489
+        String inputLine;
490
+        StringBuilder response = new StringBuilder();
491
+
492
+        while ((inputLine = in.readLine()) != null) {
493
+            response.append(inputLine);
494
+        }
495
+        in.close();
496
+
497
+        connection.disconnect();
498
+        return response.toString();
499
+    }
466 500
     /**
467 501
      * 简化版 - 发送 form-data 格式的 POST 请求(不带请求头)
468 502
      *