Merge branch 'script_gj' into 'master'
第三方统计小区覆盖率修改 See merge request !1016
This commit is contained in:
+8
-7
@@ -1,6 +1,6 @@
|
|||||||
package com.fangjia.script.gj.data_handle
|
package com.fangjia.script.gj.data_handle
|
||||||
|
|
||||||
import com.fangjia.datastore.driver.FacetResult
|
|
||||||
import com.fangjia.script.BaseBatch
|
import com.fangjia.script.BaseBatch
|
||||||
import com.fangjia.script.BatchOwner
|
import com.fangjia.script.BatchOwner
|
||||||
import com.fangjia.script.Watcher
|
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.DateUtils
|
||||||
import com.fangjia.script.util.ElasticUtils
|
import com.fangjia.script.util.ElasticUtils
|
||||||
import com.fangjia.script.util.MongoUtils
|
import com.fangjia.script.util.MongoUtils
|
||||||
import com.mongodb.AggregationOutput
|
|
||||||
import com.mongodb.BasicDBObject
|
import com.mongodb.BasicDBObject
|
||||||
import com.mongodb.DBCollection
|
import com.mongodb.DBCollection
|
||||||
import com.mongodb.DBObject
|
|
||||||
|
|
||||||
@BatchOwner(Watcher.GaoJuan)
|
@BatchOwner(Watcher.GaoJuan)
|
||||||
class ThardParthAnalyBatch extends BaseBatch{
|
class ThardParthAnalyBatch extends BaseBatch{
|
||||||
|
|
||||||
def thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
def thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
||||||
static DBCollection THIRD_PARTY_STAT = MongoUtils.getCollectionByName("fangjia_stat", "third_party_stat", "mongo.db.fangjia.com")
|
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) {
|
static main(args) {
|
||||||
runBatch(new ThardParthAnalyBatch(), args)
|
runBatch(new ThardParthAnalyBatch(), args)
|
||||||
@@ -119,11 +117,14 @@ class ThardParthAnalyBatch extends BaseBatch{
|
|||||||
}
|
}
|
||||||
|
|
||||||
def findMatchSuccessDistCount(sDate){
|
def findMatchSuccessDistCount(sDate){
|
||||||
def q = new BasicDBObject().append("s_date", sDate).append("avg_price", new BasicDBObject('$gt', 0)).append("status", 4)
|
// def q = new BasicDBObject().append("s_date", sDate).append("avg_price", new BasicDBObject('$gt', 0)).append("status", 4)
|
||||||
def dbcursor = thirdPartyColl.find(q)
|
// def dbcursor = thirdPartyColl.find(q)
|
||||||
|
|
||||||
|
def q = new BasicDBObject().append("s_date", sDate)
|
||||||
|
def dbcursor = data_process_coll.find(q)
|
||||||
def set = new HashSet()
|
def set = new HashSet()
|
||||||
for (def d : dbcursor) {
|
for (def d : dbcursor) {
|
||||||
set << d.city+"##"+d.region+"##"+d.name
|
set << d.match_city+"##"+d.match_region+"##"+d.match_name
|
||||||
}
|
}
|
||||||
return set.size()
|
return set.size()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user