去测试
This commit is contained in:
+4
-5
@@ -80,7 +80,6 @@ class TempExportData {
|
|||||||
|
|
||||||
def fzHouseStat(){
|
def fzHouseStat(){
|
||||||
def districts = CommonDatautils.findAllDistricts("福州", "district", ["city", "region", "name", "alias","estate_type2"])
|
def districts = CommonDatautils.findAllDistricts("福州", "district", ["city", "region", "name", "alias","estate_type2"])
|
||||||
districts = districts[0..10]
|
|
||||||
def addCount = new AtomicLong()
|
def addCount = new AtomicLong()
|
||||||
final CountDownLatch latch = new CountDownLatch(districts.size())
|
final CountDownLatch latch = new CountDownLatch(districts.size())
|
||||||
def total = districts.size()
|
def total = districts.size()
|
||||||
@@ -88,8 +87,8 @@ class TempExportData {
|
|||||||
rets << ["城市","区域","名称","上月价格","3年房源量","2年房源量", "2年第三方家数"]
|
rets << ["城市","区域","名称","上月价格","3年房源量","2年房源量", "2年第三方家数"]
|
||||||
for(def i=0;i<districts.size();i++){
|
for(def i=0;i<districts.size();i++){
|
||||||
final def o = districts[i]
|
final def o = districts[i]
|
||||||
// fixedThreadPool.execute(new Runnable() {
|
fixedThreadPool.execute(new Runnable() {
|
||||||
// void run() {
|
void run() {
|
||||||
try{
|
try{
|
||||||
addCount.addAndGet(1)
|
addCount.addAndGet(1)
|
||||||
def prices = CommonDatautils.queryDistrictPrices(o.city, o.region, o.name, "2024-10-01", "2024-10-31")
|
def prices = CommonDatautils.queryDistrictPrices(o.city, o.region, o.name, "2024-10-01", "2024-10-31")
|
||||||
@@ -114,8 +113,8 @@ class TempExportData {
|
|||||||
} finally {
|
} finally {
|
||||||
latch.countDown()
|
latch.countDown()
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
latch.await()
|
latch.await()
|
||||||
return rets
|
return rets
|
||||||
|
|||||||
Reference in New Issue
Block a user