From 50084de4a140dece61019b64fd91df041d242e47 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 23 十二月 2024 15:28:53 +0800 Subject: [PATCH] getInfoByIds(Set<String> pointIds) 模型输入计划数据获取、补全 模型输入mergeitem存默认生成的outputid sampleInfo.setPointMap 避免重复查询point --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/HttpRequest.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/HttpRequest.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/HttpRequest.java index 3588186..00d9cc0 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/HttpRequest.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/HttpRequest.java @@ -1,5 +1,6 @@ package com.iailab.module.data.common.utils; +import com.iailab.framework.tenant.core.context.TenantContextHolder; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpPost; @@ -142,6 +143,7 @@ // 打开和URL之间的连接 URLConnection conn = realUrl.openConnection(); // 设置通用的请求属性 + conn.setRequestProperty("content-type", "application/json"); conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); @@ -247,6 +249,7 @@ * @return */ public static String doPost(String url, String json, String charset, String token) { + Long tenantId = TenantContextHolder.getTenantId(); org.apache.http.client.HttpClient httpClient = null; HttpPost httpPost = null; String result = null; @@ -257,6 +260,7 @@ httpPost.addHeader("Accept", "application/json"); httpPost.addHeader("Content-Type", "application/json;charset=UTF-8"); httpPost.addHeader("token", token); + httpPost.addHeader("Tenant-Id", String.valueOf(tenantId)); StringEntity stringEntity = new StringEntity(json); stringEntity.setContentEncoding("UTF-8"); stringEntity.setContentType("application/json"); -- Gitblit v1.9.3