From 1e055ad8969d7853e09cc22a83041bd6ff1fe102 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 14 Nov 2022 15:46:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E7=89=A9=E4=B8=9A=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/thirdPriceCrawl/SynchDistrictPrice.groovy | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy index a84057ac1..57c47a013 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy @@ -25,7 +25,7 @@ class SynchDistrictPrice extends BaseBatch{ def sourceMap = ["ke.com":"贝壳找房","cityhouse.cn":"城市房产"] // "吉屋":"吉屋","365淘房":"365淘房","我爱我家":"我爱我家","诸葛找房APP":"诸葛找房","贝壳":"贝壳找房","链家":"链家","Q房":"Q房","麦田":"麦田","中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产" - def esSources = [ "吉屋":"吉屋","365淘房":"365淘房","我爱我家":"我爱我家","诸葛找房APP":"诸葛找房","贝壳":"贝壳找房","链家":"链家","Q房":"Q房","麦田":"麦田","中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产"] + def esSources = [ "搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产"] static main(args) { @@ -145,7 +145,7 @@ class SynchDistrictPrice extends BaseBatch{ println "["+source +"-"+city + "] add:"+ rets.size()+" 原抓取:"+count }else{ for(def r : rets){ - def obj= findIsExists(r.city, r.region, r.name, r.estate_type, SHORT_DATE, source) + def obj= findIsExists(r.city, r.region, r.name, SHORT_DATE, source) if(obj){ updateIndex++ // thirdPartyColl.remove(new BasicDBObject('_id',obj._id)) @@ -183,16 +183,14 @@ class SynchDistrictPrice extends BaseBatch{ } - def findIsExists(def city, def region, def name, estate_type, def sDate, def source){ + def findIsExists(def city, def region, def name, def sDate, def source){ def q = new BasicDBObject() q.put("source", source) q.put("s_date", sDate) q.put("city", city) q.put("region", region) q.put("name", name) - if(estate_type){ - q.put("estate_type",estate_type) - } + def obj = thirdPartyColl.findOne(q) return obj }