From 08b6a55a3a111aaee9842999b85afa60b6d61dc3 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期四, 14 十一月 2024 15:29:38 +0800 Subject: [PATCH] 大华及海康摄像头截图功能开发 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/HttpRequest.java | 5 ++--- 1 files changed, 2 insertions(+), 3 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 0f4a314..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,6 +1,5 @@ package com.iailab.module.data.common.utils; -import com.iailab.framework.security.core.util.SecurityFrameworkUtils; import com.iailab.framework.tenant.core.context.TenantContextHolder; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; @@ -250,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; @@ -260,8 +260,7 @@ httpPost.addHeader("Accept", "application/json"); httpPost.addHeader("Content-Type", "application/json;charset=UTF-8"); httpPost.addHeader("token", token); - //传递租户id - httpPost.addHeader("Tenant-Id", String.valueOf(TenantContextHolder.getTenantId())); + httpPost.addHeader("Tenant-Id", String.valueOf(tenantId)); StringEntity stringEntity = new StringEntity(json); stringEntity.setContentEncoding("UTF-8"); stringEntity.setContentType("application/json"); -- Gitblit v1.9.3