优化易方达接口

This commit is contained in:
2026-03-11 20:08:27 +08:00
parent c6297614e0
commit 06758af327
2 changed files with 6 additions and 6 deletions
@@ -64,7 +64,7 @@ try {
println "接口地址:http://open.fangjia.com/efund/match"
println "线程数:CPU核心数 × 4 = ${Runtime.getRuntime().availableProcessors() * 4}"
ExcelUtils.multiThreadingModify(outputFile, { List row ->
ExcelUtils.modify(outputFile, { List row ->
HttpRequest request = new HttpRequest()
long startTime = System.currentTimeMillis()
@@ -103,7 +103,7 @@ try {
row[14] = result.optString("update_time", "")
row[15] = duration
row[16] = "" // 无异常
row[17] = result.optString("typical_total_price", "")
row[17] = result.optString("residential_1km_price", "")
} else {
// 接口返回异常
row[15] = duration
@@ -139,13 +139,13 @@ try {
List row = finalData[i]
// 统计成功/失败
String errorMsg = row[14]?.toString() ?: ""
String errorMsg = row[16]?.toString() ?: ""
if (errorMsg == "") {
successCount++
// 统计耗时
if (row[13] instanceof Number) {
int duration = ((Number)row[13]).intValue()
if (row[15] instanceof Number) {
int duration = ((Number)row[15]).intValue()
totalTime += duration
// 耗时分布