From ec7d9c8dc5e35961d06447ebb51b78c0b2cfc83c Mon Sep 17 00:00:00 2001 From: gaojuan Date: Fri, 22 Nov 2024 15:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E8=A6=86=E7=9B=96=E7=8E=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gj/data_handle/ThardParthAnalyBatch.groovy | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy index 6a2ee9eec..8127ca79c 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy @@ -1,6 +1,6 @@ package com.fangjia.script.gj.data_handle -import com.fangjia.datastore.driver.FacetResult + import com.fangjia.script.BaseBatch import com.fangjia.script.BatchOwner import com.fangjia.script.Watcher @@ -10,17 +10,15 @@ import com.fangjia.script.thirdPriceCrawl.CrawalDBUtil import com.fangjia.script.util.DateUtils import com.fangjia.script.util.ElasticUtils import com.fangjia.script.util.MongoUtils -import com.mongodb.AggregationOutput import com.mongodb.BasicDBObject import com.mongodb.DBCollection -import com.mongodb.DBObject @BatchOwner(Watcher.GaoJuan) class ThardParthAnalyBatch extends BaseBatch{ def thirdPartyColl = CrawalDBUtil.getThirdPartyCol(); static DBCollection THIRD_PARTY_STAT = MongoUtils.getCollectionByName("fangjia_stat", "third_party_stat", "mongo.db.fangjia.com") - + static DBCollection data_process_coll = MongoUtils.getCollectionByName("fangjia_stat", "data_process", "mongo.db.fangjia.com") static main(args) { runBatch(new ThardParthAnalyBatch(), args) @@ -119,11 +117,14 @@ class ThardParthAnalyBatch extends BaseBatch{ } def findMatchSuccessDistCount(sDate){ - def q = new BasicDBObject().append("s_date", sDate).append("avg_price", new BasicDBObject('$gt', 0)).append("status", 4) - def dbcursor = thirdPartyColl.find(q) +// def q = new BasicDBObject().append("s_date", sDate).append("avg_price", new BasicDBObject('$gt', 0)).append("status", 4) +// def dbcursor = thirdPartyColl.find(q) + + def q = new BasicDBObject().append("s_date", sDate) + def dbcursor = data_process_coll.find(q) def set = new HashSet() for (def d : dbcursor) { - set << d.city+"##"+d.region+"##"+d.name + set << d.match_city+"##"+d.match_region+"##"+d.match_name } return set.size() }