房源统计更新
This commit is contained in:
+6
-2
@@ -87,8 +87,12 @@ class DistrictHouseBatch extends BaseBatch {
|
|||||||
long rentCount = 0
|
long rentCount = 0
|
||||||
for(def name : names){
|
for(def name : names){
|
||||||
String key = name.toString().trim() + "_" + district.get("region") + "_" + district.get("city")
|
String key = name.toString().trim() + "_" + district.get("region") + "_" + district.get("city")
|
||||||
sellCount = sellCount + (sellCountMap.get(key) ? sellCountMap.get(key) : 0)
|
if(!sellCount){
|
||||||
rentCount = rentCount + (rentCountMap.get(key) ? rentCountMap.get(key) : 0)
|
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)
|
saveToDistrictHouse(district.get('city'), district.get("region"), district.get("name"), sellCount, rentCount, sn)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user