Explorar o código

新增自动去除空的查询条件

周浩 %!s(int64=9) %!d(string=hai) anos
pai
achega
f3e5be1d12

+ 2 - 0
hsweb-web-bean/src/main/java/org/hsweb/web/bean/common/SqlParam.java

@@ -1,5 +1,6 @@
 package org.hsweb.web.bean.common;
 
+import org.webbuilder.utils.common.MapUtils;
 import org.webbuilder.utils.common.StringUtils;
 
 import java.util.*;
@@ -46,6 +47,7 @@ public class SqlParam<R extends SqlParam> {
     }
 
     public Map<String, Object> getTerm() {
+        this.term = MapUtils.removeEmptyValue(term);
         changeTerm(this.term);
         return term;
     }