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 }