租金脚本添加城市参数
This commit is contained in:
+11
-1
@@ -16,6 +16,7 @@ import com.fangjia.script.util.ServerAreaMap
|
|||||||
import com.google.common.collect.MapDifference
|
import com.google.common.collect.MapDifference
|
||||||
import com.google.common.collect.Maps
|
import com.google.common.collect.Maps
|
||||||
import com.mongodb.*
|
import com.mongodb.*
|
||||||
|
import org.apache.commons.lang.StringUtils
|
||||||
import org.bson.types.ObjectId
|
import org.bson.types.ObjectId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +48,16 @@ class InsertMonitorSquareRentCalcCommandBatch extends BaseBatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void process(Object args) {
|
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
|
println cities
|
||||||
Date weekend = getLastDayOfMonth()
|
Date weekend = getLastDayOfMonth()
|
||||||
println weekend
|
println weekend
|
||||||
|
|||||||
Reference in New Issue
Block a user