From ad69b5895a0348dd827a32513293ce4bee920519 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期四, 02 一月 2025 14:35:23 +0800 Subject: [PATCH] 调度模型下发数据类型字典、数据质量字典 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java index 7803bec..69ef90b 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java @@ -1,5 +1,6 @@ package com.iailab.module.data.influxdb.common.config; +import com.iailab.framework.tenant.core.context.TenantContextHolder; import com.influxdb.client.InfluxDBClient; import com.influxdb.client.InfluxDBClientFactory; import org.slf4j.Logger; @@ -18,14 +19,16 @@ @Value("${influx-db.org}") public String org; - @Value("${influx-db.bucket}") - public String bucket; + /*@Value("${influx-db.bucket}") + public String bucket;*/ @Value("${influx-db.token}") public String token; @Value("${influx-db.url}") public String url; + + private final static String BUCKET_NAME = "bucket_"; private Logger logger = LoggerFactory.getLogger(getClass()); @@ -43,4 +46,8 @@ return client; } + public String getBucket() { + return BUCKET_NAME + TenantContextHolder.getRequiredTenantId(); + } + } -- Gitblit v1.9.3