perf: 社区版获取客户端IP信息
This commit is contained in:
parent
b8ad3038ca
commit
e760bdf5e1
@ -260,6 +260,7 @@ public class DatasetDataManage {
|
||||
|
||||
public Long getDatasetTotal(Long datasetGroupId) throws Exception {
|
||||
DatasetGroupInfoDTO dto = datasetGroupManage.getForCount(datasetGroupId);
|
||||
if (ObjectUtils.isEmpty(dto)) return 0L;
|
||||
if (StringUtils.equalsIgnoreCase(dto.getNodeType(), "dataset")) {
|
||||
return getDatasetTotal(dto, null, new ChartExtRequest());
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ import java.util.List;
|
||||
@Component
|
||||
public class LinkInterceptor implements HandlerInterceptor {
|
||||
|
||||
private final static String whiteListText = "/user/ipInfo, /apisix/check, /datasetData/enumValue, /datasetData/enumValueObj, /datasetData/getFieldTree, /dekey, /share/validate, /sysParameter/queryOnlineMap";
|
||||
private final static String whiteListText = "/user/ipInfo, /apisix/check, /datasetData/enumValue, /datasetData/enumValueObj, /datasetData/getFieldTree, /dekey, /share/validate, /sysParameter/queryOnlineMap, /chartData/innerExportDetails";
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package io.dataease.substitute.permissions.user;
|
||||
|
||||
|
||||
import io.dataease.api.permissions.user.vo.CurIpVO;
|
||||
import io.dataease.api.permissions.user.vo.UserFormVO;
|
||||
import io.dataease.utils.IPUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
@ -27,6 +28,7 @@ public class SubstituteUserServer {
|
||||
result.put("language", "zh-CN");
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("/personInfo")
|
||||
public UserFormVO personInfo() {
|
||||
UserFormVO userFormVO = new UserFormVO();
|
||||
@ -38,4 +40,13 @@ public class SubstituteUserServer {
|
||||
userFormVO.setModel("lose");
|
||||
return userFormVO;
|
||||
}
|
||||
|
||||
@GetMapping("/ipInfo")
|
||||
public CurIpVO ipInfo() {
|
||||
CurIpVO curIpVO = new CurIpVO();
|
||||
curIpVO.setAccount("admin");
|
||||
curIpVO.setName("管理员");
|
||||
curIpVO.setIp(IPUtils.get());
|
||||
return curIpVO;
|
||||
}
|
||||
}
|
||||
|
||||
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 53406012c49a8f108dad40f87b6963a729ae05dd
|
||||
Subproject commit a355248cac7b72ff99179f09e94e13c3bf09aff8
|
||||
Loading…
Reference in New Issue
Block a user