From 55d5a7502627bf794adbbdeb041e0274a99e304c Mon Sep 17 00:00:00 2001 From: zhangnaisong <2434969829@qq.com> Date: 星期一, 04 三月 2024 09:38:54 +0800 Subject: [PATCH] 无人机加入开关提交 --- ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java | 14 ++++++++++---- 1 files changed, 10 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 4fc1e7a..b6391b0 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 @@ -66,8 +66,14 @@ @Autowired private RedisCache redisCache; + @Value("${uav.enabled}") + private Boolean uavEnabled; + @PostConstruct public void created() { + if(!uavEnabled){//鏃犱汉鏈哄姞鍏ュ紑鍏� + return; + } getUavConfig(); this.login(); @@ -76,14 +82,14 @@ } private void getUavConfig() { - this.host = ConfigUtils.getConfigValue("uav_host"); + /*this.host = ConfigUtils.getConfigValue("uav_host"); this.username = ConfigUtils.getConfigValue("uav_username"); this.password = ConfigUtils.getConfigValue("uav_password"); - this.salt = ConfigUtils.getConfigValue("uav_salt"); - /*this.host = "http://112.98.126.2:6100/"; + this.salt = ConfigUtils.getConfigValue("uav_salt");*/ + this.host = "http://112.98.126.2:6100/"; this.username = "znstest"; this.password = "znstest"; - this.salt = "0123456789012345";*/ + this.salt = "0123456789012345"; if (StringUtils.isEmpty(this.host) || StringUtils.isEmpty(this.username) || StringUtils.isEmpty(this.password) || StringUtils.isEmpty(this.salt)) { throw new RuntimeException("鏃犱汉鏈哄弬鏁伴厤缃己澶�:"); } -- Gitblit v1.9.3