新增小区数据量统计

This commit is contained in:
沈健
2021-06-07 10:14:21 +08:00
parent 995e92f438
commit 58f41e5154
2 changed files with 0 additions and 8 deletions
@@ -45,10 +45,6 @@ class SeaweedAroundPoi {
def lat = obj.lat
List<AmapPoi> pois = GaoDeUtils.searchNearDtoByPoi(city, types, lng, lat, 1000, "")
if (CollectionUtils.isNotEmpty(pois)) {
if (pois.get(0).id == "10044") {
executorService.shutdown()
throw new Error("当日调用已超限")
}
String jsonStr = JSONObject.toJSONString(pois)
HttpUtils.postForJson(URL, jsonStr)
conn136.update(new BasicDBObject("_id", obj._id), new BasicDBObject('$set', new BasicDBObject("status", 0).append("flag", "已获取周边POI")))
@@ -141,10 +141,6 @@ class GaoDeUtils {
//throw new RuntimeException("开发者的日访问量超限,被系统自动封停,第二天0:00会自动解封")
// 多线程情况下还是exit有效果,抛异常不会停止程序
System.exit(1)
// AmapPoi amapPoi = new AmapPoi()
// amapPoi.id = "10044"
// result.add(amapPoi)
// break;
} else if (json && json.infocode && json.infocode == "10004") {
// 开发者的单位时间内(1分钟)访问量超限,被系统自动封停,下一分钟自动解封。
Thread.sleep(60000)