From 52f522c060ae0b1884be86e3d9041782c85215df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Wed, 17 Dec 2025 14:52:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fangjia/open/controllers/PoiController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PoiController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PoiController.java index 08c74dfef..1797aba1c 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PoiController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PoiController.java @@ -287,7 +287,7 @@ public class PoiController { double lng = Double.parseDouble(lngStr); double lat = Double.parseDouble(latStr); Map> result = new HashMap>(); - List bankSmallType = Arrays.asList("银行", "中国人民银行", "国家开发银行", "中国进出口银行", + List bankSmallType = Arrays.asList("中国人民银行", "国家开发银行", "中国进出口银行", "中国银行", "中国工商银行", "中国建设银行", "中国农业银行", "交通银行", "招商银行", "华夏银行", "中信银行", "中国民生银行", "中国光大银行", "上海银行", "上海浦东发展银行", "平安银行", "兴业银行", "北京银行", "广发银行", "农村商业银行", "香港恒生银行", "东亚银行", "花旗银行", "渣打银行", "汇丰银行", From a1154e786f5711f0612e1da7c5b41cccb71656fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Thu, 18 Dec 2025 16:08:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B9=B3=E7=B1=B3=E7=A7=9F=E9=87=91?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E5=A4=A9=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fangjia/open/controllers/PropertyController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index 18270c8ab..fe69f2c56 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -2617,7 +2617,7 @@ public class PropertyController { item.put("city", sqmetreRent.getCity()); item.put("district", sqmetreRent.getRegion()); item.put("name", sqmetreRent.getDistrictName()); - item.put("rent", sqmetreRent.getAvgPrice().intValue()); + item.put("rent", DataUtil.roundDouble(sqmetreRent.getAvgPrice().doubleValue()/30.0, 2)); item.put("date", DateUtil.formatByPattern(sqmetreRent.getWeekend(), "yyyy-MM")); result.add(item); } From 6cf26b835e1ce7cac761efc00e78b15c3cddd587 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Fri, 19 Dec 2025 18:03:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=88=BF=E6=BA=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=AF=B9=E4=BA=8E=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E6=9B=B4=E6=94=B9=E7=9A=84=E6=88=BF=E6=BA=90?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=88=A0=E9=99=A4=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FjwBigdataForsaleBatch.groovy | 76 ++++++++++++++++--- 1 file changed, 67 insertions(+), 9 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy index c9801ad9e..2c0cd6f32 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy @@ -1,5 +1,6 @@ package com.fangjia.script.gj.fjwPriceBaseData +import cn.emay.mina.util.ConcurrentHashSet import com.fangjia.script.BaseBatch import com.fangjia.script.BatchOwner import com.fangjia.script.Watcher @@ -119,9 +120,14 @@ class FjwBigdataForsaleBatch extends BaseBatch{ def exportSellCSV(index,city, cityCodeDataMap, distCodeMap, districts, startDate, endDate, houseIdsfilter){ def retMap = findAllCommHouse(index,city, cityCodeDataMap, distCodeMap, districts, startDate, endDate, houseIdsfilter) - println city + "(原)房源总量:"+retMap.size() + def cityCode = cityCodeDataMap.get(city) + def delHouseIds = retMap.del_houses + println city + "(删除)房源总量:"+delHouseIds.size() + delHousesToPgSql(cityCode, delHouseIds) - def allDatas = retMap.values() + + def allDatas = retMap.add_houses.values() + println city + "(新增)房源总量:"+allDatas.size() saveToPgSql(allDatas) } @@ -133,6 +139,7 @@ class FjwBigdataForsaleBatch extends BaseBatch{ BloomFilter curhousefilter = BloomFilter.create(Funnels.stringFunnel(StandardCharsets.UTF_8), 200000000, 0.000001); def retMap = new ConcurrentHashMap() + def delHouseIds = new ConcurrentHashSet() for(def i=0;i + def sql = "delete from base.bigdata_forsale where urbn_id=? and gujia_sell_id=?" + def stmt = conn.prepareStatement(sql) + + try { + int count = 0 + ids.each { id -> + stmt.setObject(1, cityCode) + stmt.setObject(2, id) + stmt.addBatch() + count++ + + // 每20000条执行一次 + if (count % 20000 == 0) { + stmt.executeBatch() + println "已执行批处理: $count" + } + } + + // 执行剩余的 + if (ids.size() % 20000 != 0) { + stmt.executeBatch() + println "执行最后一批: ${ids.size() % 20000}" + } + + println "总处理记录数: $count" + } finally { + stmt.close() + } + } + + println "end: "+new Date() + } + def saveToPgSql(rows){ for(def r : rows) {