diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java index 1d8a0bdd25..1cf32a21ed 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java @@ -220,13 +220,15 @@ public class PermissionManage { private String handleSysVariable(UserFormVO userEntity, String sysVariable) { String value = null; + System.out.println(sysVariable); + System.out.println(JsonUtil.toJSONString(userEntity)); if (StringUtils.isNotBlank(sysVariable) && sysVariable.startsWith("${") && sysVariable.endsWith("}")) { String variableId = sysVariable.substring(2, sysVariable.length() - 1); for (SysVariableValueItem variable : userEntity.getVariables()) { - if (variableId.equalsIgnoreCase(variable.getVariableId())) { + if (variableId.equalsIgnoreCase(variable.getVariableId().toString())) { if (variable.getSysVariableDto().getType().equalsIgnoreCase("text")) { for (SysVariableValueDto sysVariableValueDto : variable.getValueList()) { - if (sysVariableValueDto.getId().toString().equals(variable.getVariableValueId())) { + if (sysVariableValueDto.getId().equals(variable.getVariableValueId())) { value = sysVariableValueDto.getValue(); } } diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserFormVO.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserFormVO.java index 4c5fed52da..2c0730cfe1 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserFormVO.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserFormVO.java @@ -44,9 +44,6 @@ public class UserFormVO implements Serializable { @Schema(description = "模式") private String model; - @Schema(description = "系统变量") - private String sysVariable; - @Schema(description = "系统变量") private List variables; } diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserGridVO.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserGridVO.java index 35f8f1d886..26394a4a52 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserGridVO.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/vo/UserGridVO.java @@ -2,7 +2,6 @@ package io.dataease.api.permissions.user.vo; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.dataease.api.permissions.variable.dto.SysVariableValueItem; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -28,5 +27,5 @@ public class UserGridVO { @Schema(description = "创建时间") private Long createTime; @Schema(description = "系统变量") - private List variables; + private String sysVariable; } diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/api/SysVariablesApi.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/api/SysVariablesApi.java index 35c9753775..8f0bbd7796 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/api/SysVariablesApi.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/api/SysVariablesApi.java @@ -36,7 +36,7 @@ public interface SysVariablesApi { @Operation(summary = "详细信息") @GetMapping("/detail/{id}") - SysVariableDto detail(@PathVariable String id); + SysVariableDto detail(@PathVariable Long id); @Operation(summary = "查询") @PostMapping("/query") @@ -55,7 +55,7 @@ public interface SysVariablesApi { void deleteValue(@PathVariable String id); @GetMapping("/value/selected/{id}") - List selectVariableValue(@PathVariable("id") String id); + List selectVariableValue(@PathVariable("id") Long id); @PostMapping("/value/selected/{goPage}/{pageSize}") IPage selectPage(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody SysVariableValueDto sysVariableValueDto); diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/dto/SysVariableValueItem.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/dto/SysVariableValueItem.java index 3e96ed2d45..b7aaa92670 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/dto/SysVariableValueItem.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/variable/dto/SysVariableValueItem.java @@ -8,12 +8,17 @@ import java.util.List; @Data public class SysVariableValueItem { - private SysVariableDto sysVariableDto; - @JsonSerialize(using = ToStringSerializer.class) - private String variableId; - @JsonSerialize(using = ToStringSerializer.class) - private String variableValueId; @JsonSerialize(using = ToStringSerializer.class) private String variableValue; + @JsonSerialize(using = ToStringSerializer.class) + private String variableValue2; + private String variableType; + @JsonSerialize(using = ToStringSerializer.class) + private Long variableId; + @JsonSerialize(using = ToStringSerializer.class) + private Long variableValueId; + private String variableName; private List valueList; + private SysVariableDto sysVariableDto; + }