update
This commit is contained in:
+9
-7
@@ -41,19 +41,21 @@ class SynchDistrictPrice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def findAllEsData(){
|
def findAllEsData(source){
|
||||||
def names = new HashSet()
|
def names = new HashSet()
|
||||||
def rets = []
|
def rets = []
|
||||||
ElasticUtils.executeSqlQuery("select * from community where source='贝壳'", {d->
|
ElasticUtils.executeSqlQuery("select * from community where source='贝壳'", {d->
|
||||||
def s = d.city +"#"+d.region+"#"+d.name
|
def s = d.city +"#"+d.region+"#"+d.name
|
||||||
if(!names.contains(s)){
|
if(!names.contains(s)){
|
||||||
names << s
|
names << s
|
||||||
d.put("district_id", d.url)
|
def data = new BasicDBObject()
|
||||||
d.put("source", source)
|
data.put("city", d.city)
|
||||||
d.put("s_date", SHORT_DATE)
|
data.put("region", d.region)
|
||||||
d.removeField("root")
|
data.put("name", d.name)
|
||||||
d.removeField("url")
|
data.put("address", d.address)
|
||||||
d.removeField("_id")
|
data.put("avg_price", d.avg_price)
|
||||||
|
data.put("source", source)
|
||||||
|
data.put("s_date", SHORT_DATE)
|
||||||
rets << d
|
rets << d
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user