Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
wangjiahao 2022-07-06 10:00:44 +08:00
commit 0c05a7fc11

View File

@ -649,7 +649,7 @@ public class ChartViewService {
boolean hasParameters = false;
if (StringUtils.isNotEmpty(table.getSqlVariableDetails())) {
List<SqlVariableDetails> sqlVariables = new Gson().fromJson(table.getSqlVariableDetails(), new TypeToken<List<SqlVariableDetails>>() {}.getType());
for (String parameter : request.getParameters()) {
for (String parameter : Optional.ofNullable(request.getParameters()).orElse(new ArrayList<>()) ) {
if (sqlVariables.stream().map(SqlVariableDetails::getVariableName).collect(Collectors.toList()).contains(parameter)) {
hasParameters = true;
}