Browse Source

2.0 where 拼接添加上主键

pms 2 years ago
parent
commit
4b5a441e87
1 changed files with 2 additions and 2 deletions
  1. 2 2
      mainFactory/src/main/java/org/bfkj/utils/MyDbHelper.java

+ 2 - 2
mainFactory/src/main/java/org/bfkj/utils/MyDbHelper.java

@@ -451,8 +451,8 @@ public class MyDbHelper {//目前只差主键的条件优化
                 filterList.get(filterList.size() - 1).put("connector", "lastConnector");//去掉最后一个连接符,减少whereStr字符串的处理
                 for (Map<String, Object> filterMap : filterList) {//循环条件参数集合
                     Object column = filterMap.get("column");//获取列名
-//                    && (MapTools.isBlank(allSQLColumn) || allSQLColumn.contains(column.toString()))
-                    if (Objects.nonNull(column) && !varList.contains(column.toString())) {//列名不为空 且 (可用列未获取 或者 当前列存在于可用列)
+//                    && !varList.contains(column.toString()) && (MapTools.isBlank(allSQLColumn) || allSQLColumn.contains(column.toString()))
+                    if (Objects.nonNull(column) ) {//列名不为空 且 (可用列未获取 或者 当前列存在于可用列)
                         String connector = Objects.isNull(filterMap.get("connector")) ? "" : filterMap.get("connector").toString();//处理连接字符串
                         Object comparator = Objects.isNull(filterMap.get("comparator")) ? "" : filterMap.get("comparator").toString();//比较符
                         whereStr = whereStr.concat(filterMap.get("left").toString())