房源统计修改
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ class HouseChangingMonitorBatch extends BaseBatch {
|
||||
DBCollection COLLECTION = MongoUtils.getCollectionByName("fangjia_log", "house_changing_monitor", "log.mongo.db.fangjia.com")
|
||||
Jms jms = Jms.create('tcp://jms.db.fangjia.com:61616');
|
||||
def EMAILS = [
|
||||
'duxiaoyu@fangjia.com'
|
||||
'gaojuan@fangjia.com'
|
||||
]
|
||||
|
||||
public static void main(String[] args){
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class WebAverageLabor extends BaseBatch{
|
||||
|
||||
public static final def CITIES = ["上海", "成都", "北京", "广州", "深圳"]
|
||||
|
||||
public static final def EMAILS = ["duxiaoyu@fangjia.com"]
|
||||
public static final def EMAILS = ["wangwenyan@fangjia.com"]
|
||||
|
||||
static Jms jms = Jms.create('tcp://jms.db.fangjia.com:61616');
|
||||
|
||||
|
||||
+9
-9
@@ -24,16 +24,16 @@ class DistrictDataCoverBatch extends BaseBatch {
|
||||
public DSCollection dsCollection = new DataStore("seaweed.db.fangjia.com", 27007).getCollection("fangjia.seaweed")
|
||||
public DBCollection mongoColl = MongoUtils.getCollectionByName("fangjia", "district_facilitys", "mongo.db.fangjia.com")
|
||||
public static final def EMAILS =[
|
||||
"duxiaoyu@fangjia.com",
|
||||
"ruanyadong@fangjia.com",
|
||||
"xiamin@fangjia.com",
|
||||
"zhutianli@fangjia.com",
|
||||
"joe@fangjia.com",
|
||||
"yukai@fangjia.com",
|
||||
"jiangxiaochun@fangjia.com",
|
||||
// "duxiaoyu@fangjia.com",
|
||||
// "ruanyadong@fangjia.com",
|
||||
// "xiamin@fangjia.com",
|
||||
// "zhutianli@fangjia.com",
|
||||
// "joe@fangjia.com",
|
||||
// "yukai@fangjia.com",
|
||||
// "jiangxiaochun@fangjia.com",
|
||||
"gaojuan@fangjia.com",
|
||||
"liuxingwang@fangjia.com",
|
||||
"xiaohai@fangjia.com",
|
||||
// "liuxingwang@fangjia.com",
|
||||
// "xiaohai@fangjia.com",
|
||||
]
|
||||
|
||||
static def FIELDS_MAP = [
|
||||
|
||||
+1
-4
@@ -33,10 +33,7 @@ class DistrictFieldCoverBatch extends BaseBatch {
|
||||
final static String coverDomain = "mongo.db.fangjia.com"
|
||||
final static String datastoreDomain = "seaweed.db.fangjia.com"
|
||||
final static def emails = [
|
||||
"duxiaoyu@fangjia.com",
|
||||
"joe@fangjia.com", "yukai@fangjia.com", "yanzhou@fangjia.com",
|
||||
"gaojuan@fangjia.com", "yuanyadong@fangjia.com", "liuxingwang@fangjia.com",
|
||||
"xiamin@fangjia.com", "zhutianli@fangjia.com"
|
||||
"gaojuan@fangjia.com"
|
||||
]
|
||||
|
||||
// final static def emails = [
|
||||
|
||||
+40
-4
@@ -1,8 +1,10 @@
|
||||
package com.fangjia.script.district
|
||||
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
|
||||
import com.mongodb.DBCursor
|
||||
import org.bson.types.ObjectId
|
||||
|
||||
import java.util.List
|
||||
|
||||
@@ -40,6 +42,19 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
|
||||
@Override
|
||||
public void process(Object args) {
|
||||
|
||||
// DBObject q = new BasicDBObject();
|
||||
// q.put("_id", new ObjectId("6501174f6f5638447b264189"));
|
||||
// def obj = CommonDatautils.getHouseDataStoreConnection().findOne(q)
|
||||
// obj.put("c_date", new Date())
|
||||
// CommonDatautils.getHouseDataStoreConnection().save(obj)
|
||||
|
||||
// CommonDatautils.getHouseDataStoreConnection().find(new BasicDBObject("districtname_key","新城帝景南区_武进_常州")).each{
|
||||
// println(it)
|
||||
// }
|
||||
|
||||
|
||||
|
||||
def cityList = cityList();
|
||||
int c = 0
|
||||
|
||||
@@ -52,9 +67,28 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
Map<String, Long> rentCountMap = facetDistrictInHouse("rent", city);
|
||||
println c + "\t" + city + "\t" + "\tsn:" + sn + "\t" + districts.size() + "\t" + DateUtil.formatToTightYYYYMMDDhhmmss(new Date())
|
||||
for(DBObject district : districts) {
|
||||
String key = district.get("name").toString().trim() + "_" + district.get("region") + "_" + district.get("city")
|
||||
long sellCount = sellCountMap.get(key) ? sellCountMap.get(key) : 0
|
||||
long rentCount = rentCountMap.get(key) ? rentCountMap.get(key) : 0
|
||||
def names = []
|
||||
names << district.name
|
||||
if(district.alias && districts.size()>0){
|
||||
for(def name : district.alias){
|
||||
if(!names.contains(name)){
|
||||
names << name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long sellCount = 0
|
||||
long rentCount = 0
|
||||
for(def name : names){
|
||||
String key = name.toString().trim() + "_" + district.get("region") + "_" + district.get("city")
|
||||
if(!sellCount){
|
||||
sellCount = sellCountMap.get(key) ? sellCountMap.get(key) : 0
|
||||
}
|
||||
if(!rentCount){
|
||||
rentCount = rentCountMap.get(key) ? rentCountMap.get(key) : 0
|
||||
}
|
||||
}
|
||||
|
||||
saveToDistrictHouse(district.get('city'), district.get("region"), district.get("name"), sellCount, rentCount, sn)
|
||||
}
|
||||
|
||||
@@ -75,6 +109,7 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
sellQuery.put('$facet', facet)
|
||||
sellQuery.put('city', city)
|
||||
sellQuery.put('cat',cat)
|
||||
// sellQuery.put("district_name","新城帝景南区")
|
||||
// sellQuery.put('visible',0)
|
||||
DSCursor sellDSCursor = SEABIRD.find(sellQuery).skip(0).limit(0)
|
||||
List<FacetResult> sellFacetResult = sellDSCursor.getFacetResults();
|
||||
@@ -109,13 +144,14 @@ class DistrictHouseBatch extends BaseBatch {
|
||||
fields.put("city", 1)
|
||||
fields.put("region", 1)
|
||||
fields.put("name", 1)
|
||||
|
||||
fields.put("alias", 1)
|
||||
def ret = []
|
||||
|
||||
DBObject q = new BasicDBObject()
|
||||
q.put('city', city)
|
||||
q.put('cat', 'district')
|
||||
q.put('visible', 0)
|
||||
// q.put("name","新城帝景")
|
||||
DSCursor cur = SEAWEED.find(q, fields).batchSize(2000)
|
||||
Iterator<DBObject> iter = cur.iterator()
|
||||
|
||||
|
||||
+1
-3
@@ -29,9 +29,7 @@ class EvaluationFieldProcent extends BaseBatch{
|
||||
public static final DBCollection EVALUA_COLL = MongoUtils.getCollectionByName("fangjia", "evaluation", "mongo.db.fangjia.com")
|
||||
public static final DBCollection EVALUA_COVER_COLL = MongoUtils.getCollectionByName("fangjia", "evaluation_field_coverage", "mongo.db.fangjia.com")
|
||||
|
||||
final static def emails = ["xiaohai@fangjia.com","jiangxiaochun@fangjia.com","limingmin@fangjia.com","duxiaoyu@fangjia.com",
|
||||
"joe@fangjia.com", "yukai@fangjia.com", "gaojuan@fangjia.com", "yuanyadong@fangjia.com",
|
||||
"xiamin@fangjia.com", "zhutianli@fangjia.com"]
|
||||
final static def emails = [ "gaojuan@fangjia.com"]
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class FjtAnalyCrawlerIp extends BaseBatch{
|
||||
public static final def lineUrl = "mongodb://developer:G00IDCDEV12385@mongo.db.fangjia.com:28017";
|
||||
public static final DBCollection addressMatchLogColl = MongoUtils.getCollectionByName2("fangjia", "address_match_log", lineUrl)
|
||||
|
||||
final static def emails = ["gaojuan@fangjia.com","jiangxiaochun@fangjia.com","duxiaoyu@fangjia.com","wangwenyan@fangjia.com","luxuping@fangjia.com","yaojiayi@fangjia.com"]
|
||||
final static def emails = ["gaojuan@fangjia.com"]
|
||||
static Jms jms = Jms.create('tcp://jms.db.fangjia.com:61616');
|
||||
|
||||
static main(args) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class DBHelper {
|
||||
static final emailsGroup0 = ['gaojuan@fangjia.com'];
|
||||
static final emailsFangjiaWang = ['all.list@fangjia.com'];
|
||||
static final mobilesYanzhou = ['13621626685'];
|
||||
static final emailsYanzhou = ['duxiaoyu@fangjia.com'];
|
||||
static final emailsYanzhou = ['wangwenyan@fangjia.com'];
|
||||
|
||||
static List<String> getCityNames(){
|
||||
DBObject dbObject = new BasicDBObject("status",0);
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.fangjia.script.wenyan
|
||||
public enum Watcher {
|
||||
|
||||
//ÔÚְͬÊÂ
|
||||
DuXiaoYu('13621626685', 'duxiaoyu@fangjia.com'),
|
||||
DuXiaoYu('13621626685', 'wangwenyan@fangjia.com'),
|
||||
WangWenYan('13916076378','wangwenyan@fangjia.com'),
|
||||
Tomzhao('15021021464','zhaoshumao@fangjia.com'),
|
||||
Tomzhao('15021021464','wangwenyan@fangjia.com'),
|
||||
GaoJuan('15021384995','gaojuan@fangjia.com');
|
||||
|
||||
private final String mobile;
|
||||
|
||||
Reference in New Issue
Block a user