fix: 修复字段由日期、数值等转文本后过滤错误的问题

This commit is contained in:
junjun
2026-05-25 14:20:37 +08:00
parent b9dae8198b
commit 25c2548621
3 changed files with 18 additions and 0 deletions

View File

@@ -164,6 +164,12 @@ public class CustomWhere2Str {
if (field.getDeExtractType() == 3) {
whereName = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_FLOAT_FORMAT);
}
} else if (field.getDeType() == 0) {
if (field.getDeExtractType() != 0) {
whereName = String.format(SQLConstants.CAST, originName, SQLConstants.VARCHAR);
} else {
whereName = originName;
}
} else {
whereName = originName;
}

View File

@@ -133,6 +133,12 @@ public class ExtWhere2Str {
if (field.getDeExtractType() == 3) {
whereName = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_FLOAT_FORMAT);
}
} else if (field.getDeType() == 0) {
if (field.getDeExtractType() != 0) {
whereName = String.format(SQLConstants.CAST, originName, SQLConstants.VARCHAR);
} else {
whereName = originName;
}
} else {
whereName = originName;
}

View File

@@ -174,6 +174,12 @@ public class WhereTree2Str {
if (field.getDeExtractType() == 3) {
whereName = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_FLOAT_FORMAT);
}
} else if (field.getDeType() == 0) {
if (field.getDeExtractType() != 0) {
whereName = String.format(SQLConstants.CAST, originName, SQLConstants.VARCHAR);
} else {
whereName = originName;
}
} else {
whereName = originName;
}