update
This commit is contained in:
+3
@@ -27,6 +27,7 @@ class SynchDealPriceToEs {
|
|||||||
def batchsize = 2000
|
def batchsize = 2000
|
||||||
def citys = getCityCount()
|
def citys = getCityCount()
|
||||||
citys.each{city,count->
|
citys.each{city,count->
|
||||||
|
if(city instanceof String){
|
||||||
for(def year = 1999;year<=2025;year++){
|
for(def year = 1999;year<=2025;year++){
|
||||||
def q = new BasicDBObject("city", city)
|
def q = new BasicDBObject("city", city)
|
||||||
q.put("trade_date", new BasicDBObject('$gte', DateUtils.parseFromTightByPattern(year+"-01-01", "yyyy-MM-dd")).append('$lte', DateUtils.parseFromTightByPattern(year+1+"-01-01", "yyyy-MM-dd")))
|
q.put("trade_date", new BasicDBObject('$gte', DateUtils.parseFromTightByPattern(year+"-01-01", "yyyy-MM-dd")).append('$lte', DateUtils.parseFromTightByPattern(year+1+"-01-01", "yyyy-MM-dd")))
|
||||||
@@ -38,6 +39,8 @@ class SynchDealPriceToEs {
|
|||||||
}
|
}
|
||||||
save(ret)
|
save(ret)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// def index = 0
|
// def index = 0
|
||||||
// for(def d : dbcursor){
|
// for(def d : dbcursor){
|
||||||
// ret << d
|
// ret << d
|
||||||
|
|||||||
Reference in New Issue
Block a user