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