Merge pull request #13453 from dataease/pr@dev-v2@fix_ds
fix(数据集): 修复数值下拉多选出错 #13449
This commit is contained in:
commit
6119a9cf6a
@ -606,7 +606,11 @@ public class SqlparserUtils {
|
||||
&& sqlVariableDetails.getDeType() == 0) {
|
||||
return "N'" + String.join("', N'", sqlVariableDetails.getValue()) + "'";
|
||||
} else {
|
||||
return "'" + String.join("','", sqlVariableDetails.getValue()) + "'";
|
||||
if (sqlVariableDetails.getDeType() == 2 || sqlVariableDetails.getDeType() == 3) {
|
||||
return String.join(",", sqlVariableDetails.getValue());
|
||||
} else {
|
||||
return "'" + String.join("','", sqlVariableDetails.getValue()) + "'";
|
||||
}
|
||||
}
|
||||
} else if (sqlVariableDetails.getOperator().equals("between")) {
|
||||
if (sqlVariableDetails.getDeType() == 1) {
|
||||
|
||||
@ -168,7 +168,11 @@ public class ExtWhere2Str {
|
||||
|| StringUtils.containsIgnoreCase(request.getDatasetTableField().getType(), "NCHAR")) {
|
||||
whereValue = "(" + value.stream().map(str -> "'" + SQLConstants.MSSQL_N_PREFIX + str + "'").collect(Collectors.joining(",")) + ")";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
if (request.getDatasetTableField().getDeType() == 2 || request.getDatasetTableField().getDeType() == 3) {
|
||||
whereValue = "(" + StringUtils.join(value, ",") + ")";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user