| | |
| | | |
| | | 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("无人机参数配置缺失:"); |
| | |
| | | //uavClient.GET("logout", null, "{}"); |
| | | String res = uavClient.POST(this.host+"login", null, body); |
| | | Map resMap = om.readValue(res, Map.class); |
| | | if (resMap != null) { |
| | | if (resMap != null&& resMap.get("data") instanceof Map) { |
| | | redisCache.setCacheMap("uav:uavUser", (Map) resMap.get("data")); |
| | | } |
| | | } catch (ForestRuntimeException e) { |