1. 补全后端的其余模块

2. 新增用户管理多部门的逻辑
This commit is contained in:
chenbowen
2025-06-30 15:44:40 +08:00
parent fbd175cba0
commit 625ad8f46f
524 changed files with 1762 additions and 1323 deletions

View File

@@ -25,8 +25,8 @@ public class IotPluginCommonAutoConfiguration {
@Bean
public RestTemplate restTemplate(IotPluginCommonProperties properties) {
return new RestTemplateBuilder()
.setConnectTimeout(properties.getUpstreamConnectTimeout())
.setReadTimeout(properties.getUpstreamReadTimeout())
.connectTimeout(properties.getUpstreamConnectTimeout())
.readTimeout(properties.getUpstreamReadTimeout())
.build();
}

View File

@@ -1,10 +1,10 @@
package cn.iocoder.yudao.module.iot.plugin.common.config;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import java.time.Duration;
/**

View File

@@ -108,7 +108,7 @@ public class IotDeviceUpstreamServer {
// 3. 等待所有服务启动完成
CompletableFuture.allOf(httpFuture, mqttFuture)
// .orTimeout(CONNECTION_TIMEOUT_MS, TimeUnit.MILLISECONDS) // TODO @芋艿JDK8 不兼容
.orTimeout(CONNECTION_TIMEOUT_MS, TimeUnit.MILLISECONDS) // TODO @芋艿JDK8 不兼容
.whenComplete((result, error) -> {
if (error != null) {
log.error("[start][服务启动失败]", error);

View File

@@ -255,8 +255,7 @@ public class IotDeviceMqttMessageHandler {
Object valueObj = entry.getValue();
// 如果是复杂结构包含value和time
if (valueObj instanceof JSONObject) {
JSONObject valueJson = (JSONObject) valueObj;
if (valueObj instanceof JSONObject valueJson) {
properties.put(key, valueJson.getOrDefault("value", valueObj));
} else {
properties.put(key, valueObj);