feat(backend):视图结果过滤,空 非空bug修复

This commit is contained in:
junjie 2021-06-09 18:12:47 +08:00
parent bfe317eb60
commit e2d6cd240c
2 changed files with 4 additions and 2 deletions

View File

@ -295,7 +295,8 @@ public class DorisQueryProvider extends QueryProvider {
filter.append(" ")
.append(transMysqlFilterTerm(request.getTerm()))
.append(" ");
if (StringUtils.containsIgnoreCase(request.getTerm(), "in")) {
if (StringUtils.containsIgnoreCase(request.getTerm(), "null")) {
} else if (StringUtils.containsIgnoreCase(request.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(value, "','")).append("')");
} else if (StringUtils.containsIgnoreCase(request.getTerm(), "like")) {
filter.append("'%").append(value).append("%'");

View File

@ -302,7 +302,8 @@ public class MysqlQueryProvider extends QueryProvider {
filter.append(" ")
.append(transMysqlFilterTerm(request.getTerm()))
.append(" ");
if (StringUtils.containsIgnoreCase(request.getTerm(), "in")) {
if (StringUtils.containsIgnoreCase(request.getTerm(), "null")) {
} else if (StringUtils.containsIgnoreCase(request.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(value, "','")).append("')");
} else if (StringUtils.containsIgnoreCase(request.getTerm(), "like")) {
filter.append("'%").append(value).append("%'");