Merge branch 'script_gj' into 'master'
Script gj See merge request !326
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ class BigdataForsaleBatch extends BaseBatch{
|
|||||||
// def distIds = getDistrictIds(cityCodeDataMap.get(city))
|
// def distIds = getDistrictIds(cityCodeDataMap.get(city))
|
||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lng","estate_type2","name_cat","address", "alias", "finish_building_date", "house_property", "property_life", "build_type", "build_structure"]);
|
def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lng","estate_type2","name_cat","address", "alias", "finish_building_date", "house_property", "property_life", "build_type", "build_structure"]);
|
||||||
exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20220418, 20220519);
|
exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20220518, 20220619);
|
||||||
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20210801, 20210831);
|
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20210801, 20210831);
|
||||||
//测试通过匹配接口配房源效果
|
//测试通过匹配接口配房源效果
|
||||||
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20201201, 20211118)
|
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20201201, 20211118)
|
||||||
|
|||||||
+9
-7
@@ -41,19 +41,21 @@ class SynchDistrictPrice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def findAllEsData(){
|
def findAllEsData(source){
|
||||||
def names = new HashSet()
|
def names = new HashSet()
|
||||||
def rets = []
|
def rets = []
|
||||||
ElasticUtils.executeSqlQuery("select * from community where source='贝壳'", {d->
|
ElasticUtils.executeSqlQuery("select * from community where source='贝壳'", {d->
|
||||||
def s = d.city +"#"+d.region+"#"+d.name
|
def s = d.city +"#"+d.region+"#"+d.name
|
||||||
if(!names.contains(s)){
|
if(!names.contains(s)){
|
||||||
names << s
|
names << s
|
||||||
d.put("district_id", d.url)
|
def data = new BasicDBObject()
|
||||||
d.put("source", source)
|
data.put("city", d.city)
|
||||||
d.put("s_date", SHORT_DATE)
|
data.put("region", d.region)
|
||||||
d.removeField("root")
|
data.put("name", d.name)
|
||||||
d.removeField("url")
|
data.put("address", d.address)
|
||||||
d.removeField("_id")
|
data.put("avg_price", d.avg_price)
|
||||||
|
data.put("source", source)
|
||||||
|
data.put("s_date", SHORT_DATE)
|
||||||
rets << d
|
rets << d
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user