From b03eb373dca3cb249bcfa545c152a58f3735c789 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Wed, 19 Jun 2024 13:50:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=8C=87=E5=AF=BC=E4=BB=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/script/util/CommonUtils.groovy | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/CommonUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/CommonUtils.groovy index 21887e3db..ac9704830 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/CommonUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/CommonUtils.groovy @@ -1,6 +1,7 @@ package com.fangjia.script.util import com.fangjia.core.RegionData +import com.fangjia.core.util.HttpRequest import com.mongodb.BasicDBObject import com.mongodb.DBCollection import com.mongodb.DBObject @@ -192,6 +193,19 @@ public class CommonUtils { } } + static void recalcAverage(String city, String region, String name, Integer count =1 , String category="sell", Boolean retainHistory=true){ + def url = "http://192.168.0.100:38080/FangJiaDataService/districtPriceCalculate"; + def params = new HashMap(); + params.city = city; + params.region = region; + params.name = name; + params.count = count.toString(); + params.category = category; + params.retainHistory = retainHistory.toString(); + HttpRequest request = new HttpRequest(); + println(request.get(url, params, "UTF-8")) + } + /** * 重算小区均价 * @param city @@ -221,7 +235,7 @@ public class CommonUtils { cmd.put("name", name) cmd.put('estate_type', estateType) cmd.put("calc_date", calcDate) - cmd.put("calc_type", 0) + cmd.put("calc_type", calcType) println(cmd) DBObject data = new BasicDBObject() data.put("category", "sell")