优化基于CID 的用户统计
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user