+4
-6
@@ -25,7 +25,7 @@ class SynchDistrictPrice extends BaseBatch{
|
|||||||
def sourceMap = ["ke.com":"贝壳找房","cityhouse.cn":"城市房产"]
|
def sourceMap = ["ke.com":"贝壳找房","cityhouse.cn":"城市房产"]
|
||||||
|
|
||||||
// "吉屋":"吉屋","365淘房":"365淘房","我爱我家":"我爱我家","诸葛找房APP":"诸葛找房","贝壳":"贝壳找房","链家":"链家","Q房":"Q房","麦田":"麦田","中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产"
|
// "吉屋":"吉屋","365淘房":"365淘房","我爱我家":"我爱我家","诸葛找房APP":"诸葛找房","贝壳":"贝壳找房","链家":"链家","Q房":"Q房","麦田":"麦田","中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产"
|
||||||
def esSources = [ "吉屋":"吉屋","365淘房":"365淘房","我爱我家":"我爱我家","诸葛找房APP":"诸葛找房","贝壳":"贝壳找房","链家":"链家","Q房":"Q房","麦田":"麦田","中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产"]
|
def esSources = [ "搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产"]
|
||||||
|
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
@@ -145,7 +145,7 @@ class SynchDistrictPrice extends BaseBatch{
|
|||||||
println "["+source +"-"+city + "] add:"+ rets.size()+" 原抓取:"+count
|
println "["+source +"-"+city + "] add:"+ rets.size()+" 原抓取:"+count
|
||||||
}else{
|
}else{
|
||||||
for(def r : rets){
|
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){
|
if(obj){
|
||||||
updateIndex++
|
updateIndex++
|
||||||
// thirdPartyColl.remove(new BasicDBObject('_id',obj._id))
|
// 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()
|
def q = new BasicDBObject()
|
||||||
q.put("source", source)
|
q.put("source", source)
|
||||||
q.put("s_date", sDate)
|
q.put("s_date", sDate)
|
||||||
q.put("city", city)
|
q.put("city", city)
|
||||||
q.put("region", region)
|
q.put("region", region)
|
||||||
q.put("name", name)
|
q.put("name", name)
|
||||||
if(estate_type){
|
|
||||||
q.put("estate_type",estate_type)
|
|
||||||
}
|
|
||||||
def obj = thirdPartyColl.findOne(q)
|
def obj = thirdPartyColl.findOne(q)
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user