diff --git a/common/src/main/java/com/sdm/common/common/mdc/FeignMdcRequestInterceptor.java b/common/src/main/java/com/sdm/common/common/mdc/FeignMdcRequestInterceptor.java index 098f6922..6b2dd38b 100644 --- a/common/src/main/java/com/sdm/common/common/mdc/FeignMdcRequestInterceptor.java +++ b/common/src/main/java/com/sdm/common/common/mdc/FeignMdcRequestInterceptor.java @@ -1,5 +1,6 @@ package com.sdm.common.common.mdc; +import com.sdm.common.common.ThreadLocalContext; import feign.RequestInterceptor; import feign.RequestTemplate; import org.apache.commons.lang3.StringUtils; @@ -15,5 +16,11 @@ public class FeignMdcRequestInterceptor implements RequestInterceptor { if (StringUtils.isNotBlank(traceId)) { template.header("X-Trace-Id", traceId); } + + // 传递tenantId + Long tenantId = ThreadLocalContext.getTenantId(); + if (tenantId != null) { + template.header("tenantid", String.valueOf(tenantId)); + } } } \ No newline at end of file diff --git a/common/src/main/java/com/sdm/common/entity/resp/system/SysUserGroupResp.java b/common/src/main/java/com/sdm/common/entity/resp/system/SysUserGroupResp.java index 766eb409..0bf6eb73 100644 --- a/common/src/main/java/com/sdm/common/entity/resp/system/SysUserGroupResp.java +++ b/common/src/main/java/com/sdm/common/entity/resp/system/SysUserGroupResp.java @@ -25,7 +25,7 @@ public class SysUserGroupResp implements Serializable { private static final long serialVersionUID = 1L; @Schema(description = "组唯一标识ID") - private Integer id; + private Long id; @Schema(description = "组名") private String groupName; @@ -40,4 +40,4 @@ public class SysUserGroupResp implements Serializable { @Schema(description = "更新时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updatedTime; -} +} \ No newline at end of file diff --git a/project/src/main/resources/mapper/SimulationNodeMapper.xml b/project/src/main/resources/mapper/SimulationNodeMapper.xml index 485cc12d..da1a0c9c 100644 --- a/project/src/main/resources/mapper/SimulationNodeMapper.xml +++ b/project/src/main/resources/mapper/SimulationNodeMapper.xml @@ -329,8 +329,8 @@