From 3571c5484eb9adf505dc1261e8d45460f0fcbcdd Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Wed, 6 Apr 2022 15:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E5=BA=86=E5=86=9C?= =?UTF-8?q?=E5=95=86=E8=A1=8C=E5=BC=80=E5=8F=91=E5=95=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fangjia/script/temp/shenjian/cqrcb/SeaweedExport.groovy | 4 +++- .../com/fangjia/script/temp/shenjian/util/SeaweedUtils.groovy | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/cqrcb/SeaweedExport.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/cqrcb/SeaweedExport.groovy index dcaeb86a2..a437ea0c3 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/cqrcb/SeaweedExport.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/cqrcb/SeaweedExport.groovy @@ -29,6 +29,8 @@ class SeaweedExport { static DBCollection cityMapConn = MongoUtils.getCollectionByName("business", "fangjia_official_area_map", "192.168.0.43", 28017) static ExecutorService executorService = Executors.newFixedThreadPool(30) + static final DBCollection seaweed = MongoUtils.getCollectionByName("fangjia", "seaweed", "192.168.0.43", 28017) + static def map = new ConcurrentHashMap() static void main(String[] args) { @@ -68,7 +70,7 @@ class SeaweedExport { filter.put("live_date", 1) // 交房时间 filter.put("elevator", 1) // 电梯 - DBObject obj = DbUtils.seaweed.findById(id) + DBObject obj = seaweed.findOne(new ObjectId(id)) if (obj) { ret[0] = obj.estate_company ret[1] = obj.developer diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/util/SeaweedUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/util/SeaweedUtils.groovy index f21ff7ae7..668172385 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/util/SeaweedUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/util/SeaweedUtils.groovy @@ -83,7 +83,7 @@ class SeaweedUtils { static formatCarSiteCount(def car_site_count) { if (car_site_count && FieldValidatorUtils.checkValue(car_site_count)) { long val = Long.valueOf(car_site_count) - if (val > 2000 || val < 100) { + if (val > 2500 || val < 100) { return "" } return val;