fix: NPE, close #I88DFH

This commit is contained in:
开源海哥 2023-10-17 10:56:17 +08:00
parent 0d337e1032
commit e00ef8c001

View File

@ -54,6 +54,7 @@ public class BaseQueryWrapper<T extends BaseQueryWrapper<T>> implements CloneSup
* <p>Title: clear. </p> * <p>Title: clear. </p>
* <p>Description: Default QueryWrapper values. </p> * <p>Description: Default QueryWrapper values. </p>
* <p>Notice: When adding new attributes, it is necessary to supplement here. </p> * <p>Notice: When adding new attributes, it is necessary to supplement here. </p>
*
* @author dragon * @author dragon
*/ */
public void clear() { public void clear() {
@ -95,11 +96,12 @@ public class BaseQueryWrapper<T extends BaseQueryWrapper<T>> implements CloneSup
protected T setWhereQueryCondition(QueryCondition queryCondition) { protected T setWhereQueryCondition(QueryCondition queryCondition) {
if (whereQueryCondition != null) { if (queryCondition != null) {
queryCondition.connect(whereQueryCondition, SqlConnector.AND); if (whereQueryCondition != null) {
queryCondition.connect(whereQueryCondition, SqlConnector.AND);
}
whereQueryCondition = queryCondition;
} }
whereQueryCondition = queryCondition;
return (T) this; return (T) this;
} }
@ -120,7 +122,6 @@ public class BaseQueryWrapper<T extends BaseQueryWrapper<T>> implements CloneSup
if (groupByColumns == null) { if (groupByColumns == null) {
groupByColumns = new ArrayList<>(); groupByColumns = new ArrayList<>();
} }
groupByColumns.add(queryColumn); groupByColumns.add(queryColumn);
return (T) this; return (T) this;
} }