From f3ad70d4052590bad956009da110393c7f38803d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Mon, 4 Jul 2022 13:19:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E9=87=91=E8=84=9A=E6=9C=AC=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=9F=8E=E5=B8=82=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InsertMonitorSquareRentCalcCommandBatch.groovy | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy index d8437413e..aaf5bf416 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy @@ -16,6 +16,7 @@ import com.fangjia.script.util.ServerAreaMap import com.google.common.collect.MapDifference import com.google.common.collect.Maps import com.mongodb.* +import org.apache.commons.lang.StringUtils import org.bson.types.ObjectId /** @@ -47,7 +48,16 @@ class InsertMonitorSquareRentCalcCommandBatch extends BaseBatch { } void process(Object args) { - def cities = ServerAreaMap.findAllCities() + String cityParam = System.getProperty("city"); + def cities = new ArrayList() + if(StringUtils.isNotBlank(cityParam)){ + cities = new ArrayList() + for(String c in cityParam.split(",")){ + cities.add(c); + } + }else{ + cities = ServerAreaMap.findAllCities() + } println cities Date weekend = getLastDayOfMonth() println weekend