房源统计更新

This commit is contained in:
2024-03-08 10:41:54 +08:00
parent 3c4f8abe9b
commit 46b6bf7268
@@ -87,8 +87,12 @@ class DistrictHouseBatch extends BaseBatch {
long rentCount = 0
for(def name : names){
String key = name.toString().trim() + "_" + district.get("region") + "_" + district.get("city")
sellCount = sellCount + (sellCountMap.get(key) ? sellCountMap.get(key) : 0)
rentCount = rentCount + (rentCountMap.get(key) ? rentCountMap.get(key) : 0)
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)
}