From 6d754022e36ce1b83c8f23bbd82178258304d493 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 29 一月 2024 15:49:59 +0800
Subject: [PATCH] 测试提交

---
 ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java b/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java
index 5f3b443..1f91fd8 100644
--- a/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java
+++ b/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java
@@ -60,8 +60,6 @@
 
     private void getUavConfig() {
         this.host = ConfigUtils.getConfigValue("uav_host");
-        this.username = ConfigUtils.getConfigValue("uav_username");
-        this.password = ConfigUtils.getConfigValue("uav_password");
         this.salt = ConfigUtils.getConfigValue("uav_salt");
         if (StringUtils.isEmpty(this.host) || StringUtils.isEmpty(this.username) || StringUtils.isEmpty(this.password) || StringUtils.isEmpty(this.salt)) {
             throw new RuntimeException("鏃犱汉鏈哄弬鏁伴厤缃己澶�:");
@@ -80,7 +78,7 @@
             e.printStackTrace();
         }
         //鎵цmethod
-        this.getToken();//鑾峰彇token楠岃瘉,楠岃瘉token鏈夋晥鎬�
+       // this.getToken();//鑾峰彇token楠岃瘉,楠岃瘉token鏈夋晥鎬�
         try {
             String token = this.getToken();
             res = (String) requestMethod.invoke(this.uavClient, this.host + url, token, data);
@@ -105,6 +103,7 @@
         //楠岃瘉token鏈夋晥鎬�
         try {
             String res = uavClient.GET(this.host+"manage/api/v1/devices", token, "{}");
+            res+="";
             //System.out.println(res);
         } catch (ForestNetworkException fe) {
             if (fe.getStatusCode() == 401) {//token澶辨晥,閲嶆柊鐧诲綍
@@ -127,7 +126,7 @@
         log.debug("body:" + body);
         try {
             //uavClient.GET("logout", null, "{}");
-            String res = uavClient.POST(this.host+"/login", null, body);
+            String res = uavClient.POST(this.host+"login", null, body);
             Map resMap = om.readValue(res, Map.class);
             if (resMap != null) {
                 redisCache.setCacheMap("uav:uavUser", (Map) resMap.get("data"));

--
Gitblit v1.9.3