From c1857de354e78521eabba66142c955c54fdc5292 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 1 Jul 2024 17:10:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/script/util/DbUtils.groovy | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy index aeda5fc28..40e691bef 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy @@ -186,6 +186,26 @@ public class DbUtils{ return query } + public static BasicDBObject buildSeaweedQuery2(def city = null, def region = null, def name = null, def cat = "district", def status = 0){ + BasicDBObject query = new BasicDBObject() + if(city){ + query.append("city", city) + } + if(region){ + query.append("region", region) + } + if(name){ + query.append("name", name) + } + if(cat != null){ + query.append("cat", cat) + } + if(status != null){ + query.append("status", status) + } + return query + } + /** * 把小区修改成删除状态 * @param id