fix:【系统变量】自定义SQL使用系统内置手机号变量数据筛选失败

This commit is contained in:
taojinlong
2026-04-15 19:15:51 +08:00
3 changed files with 6 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ public class DeSqlparserUtils {
} else {
value = handleSubstitutedSql(sysVariableId);
}
if (value != null) {
if (StringUtils.isNotEmpty(value)) {
sqlItem = sqlItem.replace(SysParamsSubstitutedParams + sysVariableId, value);
replaceParamItem = true;
}
@@ -241,6 +241,9 @@ public class DeSqlparserUtils {
if (sysVariableId.equalsIgnoreCase("sysParams.userName")) {
return userEntity.getName();
}
if (sysVariableId.equalsIgnoreCase("sysParams.userPhone")) {
return userEntity.getPhone();
}
for (SysVariableValueItem variable : userEntity.getVariables()) {
if (!variable.isValid()) {
continue;

View File

@@ -9,4 +9,5 @@ public class Item {
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
private String name;
private String account;
}