diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy index 98612d573..ffd743d5c 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/ThirdPartyPriceBatch.groovy @@ -30,8 +30,11 @@ class ThirdPartyPriceBatch extends BaseBatch { static final DBCollection AVERAGE_STATISTICS = MongoUtils.getCollectionByName("fangjia", "average_statistics", "192.168.0.43") DBCollection DIST_SELL_STAT = MongoUtils.getCollectionByName("fangjia_stat", "district_stat", "mongo.db.fangjia.com") - def sourceMap = ["诸葛找房":"01", "安居客":"02","房天下":"03","链家":"04","城市家居":"05","麦田":"06","贝壳":"07","淘房365":"08","中原":"09","兔博士":"10","Q房":"11","房探":"12", - "房多多":"13","我爱我家":"14","禧泰数据":"15","吉屋网":"16","乐居":"17","21世纪":"18","房产超市":"19","58同城":"20"] + def sourceMap = ["诸葛找房":"01", "安居客":"02","房天下":"03","链家":"04","城市家居":"05","麦田":"06","贝壳":"07", + "淘房365":"08","中原":"09","兔博士":"10","Q房":"11","房探":"12","房多多":"13","我爱我家":"14", + "禧泰数据":"15","吉屋网":"16","乐居":"17","21世纪":"18","房产超市":"19","58同城":"20", + "乐有家":"21","幸福里":"22","中国房价行情":"23","常州住房":"24" + ] def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.236:1521:orcl", "GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver") @@ -263,6 +266,30 @@ class ThirdPartyPriceBatch extends BaseBatch { if(third.get("csjj_esf_price")){ price_map.csjj_avg_price = third.get("csjj_esf_price") } + + if(third.get("leyoujia_esf_price")){ + price_map.leyoujia_avg_price = third.get("leyoujia_esf_price") + } + + if(third.get("c21_esf_price")){ + price_map.c21_avg_price = third.get("c21_esf_price") + } + + if(third.get("jiwu_esf_price")){ + price_map.jiwu_avg_price = third.get("jiwu_esf_price") + } + + if(third.get("xingfuli_esf_price")){ + price_map.xingfuli_avg_price = third.get("xingfuli_esf_price") + } + + if(third.get("zwfc_esf_price")){ + price_map.zwfc_avg_price = third.get("zwfc_esf_price") + } + + if(third.get("creprice_esf_price")){ + price_map.creprice_avg_price = third.get("creprice_esf_price") + } dataMap.updatetime = DateUtils.formatDateByPattern(new Date(), "yyyy-MM-dd HH:mm:ss") allRows << dataMap } @@ -313,6 +340,18 @@ class ThirdPartyPriceBatch extends BaseBatch { web = "房产超市" }else if(k=="csjj_avg_price"){ web = "城市居家" + }else if(k=="leyoujia_avg_price"){ + web = "乐有家" + }else if(k=="c21_avg_price"){ + web = "C21" + }else if(k=="jiwu_avg_price"){ + web = "吉屋网" + }else if(k=="xingfuli_avg_price"){ + web = "幸福里" + }else if(k=="creprice_avg_price"){ + web = "中国房价行情" + }else if(k=="zwfc_avg_price"){ + web = "常州住房" } ret << sourceMap.get(web) @@ -603,6 +642,30 @@ class ThirdPartyPriceBatch extends BaseBatch { if(!dataMap.get("csjj_esf_price") && db.get("csjj_esf_price") && db.get("csjj_esf_price")>3000){ dataMap.put("csjj_esf_price", db.get("csjj_esf_price")) } + + if(!dataMap.get("leyoujia_esf_price") && db.get("leyoujia_esf_price") && db.get("leyoujia_esf_price")>3000){ + dataMap.put("leyoujia_esf_price", db.get("leyoujia_esf_price")) + } + + if(!dataMap.get("c21_esf_price") && db.get("c21_esf_price") && db.get("c21_esf_price")>3000){ + dataMap.put("c21_esf_price", db.get("c21_esf_price")) + } + + if(!dataMap.get("jiwu_esf_price") && db.get("jiwu_esf_price") && db.get("jiwu_esf_price")>3000){ + dataMap.put("jiwu_esf_price", db.get("jiwu_esf_price")) + } + + if(!dataMap.get("xingfuli_esf_price") && db.get("xingfuli_esf_price") && db.get("xingfuli_esf_price")>3000){ + dataMap.put("xingfuli_esf_price", db.get("xingfuli_esf_price")) + } + + if(!dataMap.get("creprice_esf_price") && db.get("creprice_esf_price") && db.get("creprice_esf_price")>3000){ + dataMap.put("creprice_esf_price", db.get("creprice_esf_price")) + } + + if(!dataMap.get("zwfc_esf_price") && db.get("zwfc_esf_price") && db.get("zwfc_esf_price")>3000){ + dataMap.put("zwfc_esf_price", db.get("zwfc_esf_price")) + } // if(db.zhugezhaofang_esf_price || db.anjuke_esf_price ||db.soufang_esf_price || db.lianjia_esf_price || db.cityhouse_esf_price || db.maitian_esf_price || db.beike_esf_price || db.get("365house_esf_price") || db.zhongyuan_esf_price || db.tuboshi_esf_price || db.qfang_esf_price || db.fangtan_esf_price || db.fangduoduo_esf_price || db.get("5i5j_esf_price")){ // map.put(key, db) // } diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy index 5f07adb27..1b9e9e1e1 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy @@ -27,7 +27,9 @@ class SynchDistrictPrice extends BaseBatch{ // "吉屋":"吉屋","365淘房":"365淘房","我爱我家":"我爱我家","诸葛找房APP":"诸葛找房","贝壳":"贝壳找房","链家":"链家","Q房":"Q房","麦田":"麦田", // "中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","乐有家":"乐有家","C21":"C21","城市房产":"城市房产","兔博士PC端":"兔博士" // def esSources = ["搜房":"搜房"] - def esSources = ["我爱我家":"我爱我家","兔博士PC端":"兔博士","吉屋":"吉屋","贝壳找房":"贝壳找房","乐有家":"乐有家","365淘房":"365淘房","诸葛找房APP":"诸葛找房","链家":"链家","Q房":"Q房","麦田":"麦田","中原地产":"中原地产","安居客小程序":"安居客","搜房":"搜房","C21":"C21","城市房产小程序":"城市房产","幸福里APP":"幸福里", "中国房价行情":"中国房价行情","常州住房":"常州住房"] + def esSources = ["安居客小程序":"安居客","搜房":"搜房","诸葛找房APP":"诸葛找房","幸福里APP":"幸福里","吉屋":"吉屋","中国房价行情":"中国房价行情","贝壳找房":"贝壳找房", + "链家":"链家","C21":"C21","城市房产小程序":"城市房产","乐有家":"乐有家","我爱我家":"我爱我家","中原地产":"中原地产","兔博士PC端":"兔博士", + "365淘房":"365淘房","Q房":"Q房","麦田":"麦田","常州住房":"常州住房"] static main(args) { runBatch(new SynchDistrictPrice(), args); diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/ThirdDataToGatherBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/ThirdDataToGatherBatch.groovy index aaf9d6380..d1fb7dc6f 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/ThirdDataToGatherBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/ThirdDataToGatherBatch.groovy @@ -33,7 +33,7 @@ class ThirdDataToGatherBatch extends BaseBatch{ "链家":"lianjia_esf","兔博士":"tuboshi_esf","城市房产":"cityhouse_esf","贝壳找房":"beike_esf","Q房":"qfang_esf","Q房(新)":"qfang_new","中原地产(新)":"zhongyuan_new", "乐有家":"leyoujia_esf","乐有家(新)":"leyoujia_new","房探":"fangtan_esf","房多多":"fangdoudou_esf","小资家":"xiaozijia_esf","我爱我家":"5i5j_esf","麦田":"maitian_esf", "房途":"fangtoo_esf","C21":"c21_esf","乐居":"leju_esf","房产超市":"fccs_esf","58同城":"58tc_esf","365淘房":"365house_esf","吉屋":"jiwu_esf","幸福里":"xingfuli_esf", - "中国房价行情":"creprice_esf","常州住房":"zwfc_esf" + "中国房价行情":"creprice_esf","常州住房":"zwfc_esf", "房天下":"fang_esf" ] public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(2)