Merge branch 'script_gj' of http://gitlab.fangjia.com/dev0/main into script_gj
This commit is contained in:
+4
-4
@@ -73,11 +73,11 @@ class SeaweedAroundPoi extends BaseBatch {
|
|||||||
// void run() {
|
// void run() {
|
||||||
def city = obj.city
|
def city = obj.city
|
||||||
if (obj.lng) {
|
if (obj.lng) {
|
||||||
//def lng = SeaweedUtils.formatLatLng(obj.lng)
|
def lng = SeaweedUtils.formatLatLng(obj.lng)
|
||||||
//def lat = SeaweedUtils.formatLatLng(obj.lat)
|
def lat = SeaweedUtils.formatLatLng(obj.lat)
|
||||||
// {'lon': 121.810877, 'lat': 31.737642}
|
// {'lon': 121.810877, 'lat': 31.737642}
|
||||||
def lng = 121.810877
|
// def lng = 121.810877
|
||||||
def lat = 31.737642
|
// def lat = 31.737642
|
||||||
List<AmapPoi> pois = GaoDeUtils.searchNearDtoByPoi(city, types, lng, lat, 1000, "")
|
List<AmapPoi> pois = GaoDeUtils.searchNearDtoByPoi(city, types, lng, lat, 1000, "")
|
||||||
if (CollectionUtils.isNotEmpty(pois)) {
|
if (CollectionUtils.isNotEmpty(pois)) {
|
||||||
String jsonStr = JSONObject.toJSONString(pois)
|
String jsonStr = JSONObject.toJSONString(pois)
|
||||||
|
|||||||
+4
-4
@@ -146,13 +146,13 @@ class GaoDeUtils {
|
|||||||
while (result.size() < count) {
|
while (result.size() < count) {
|
||||||
params.page = "${page}".toString()
|
params.page = "${page}".toString()
|
||||||
page++
|
page++
|
||||||
//params.key = this.getGaodeKey("v3/place/around")
|
params.key = this.getGaodeKey("v3/place/around")
|
||||||
params.key = "25b2d459fd133e22f8abcebeac972692"
|
//params.key = "25b2d459fd133e22f8abcebeac972692"
|
||||||
params.offset = "100"
|
params.offset = "100"
|
||||||
JSONObject json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v3/place/around", params);
|
JSONObject json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v3/place/around", params);
|
||||||
if (json == null) {
|
if (json == null) {
|
||||||
//params.key = this.getGaodeKey("v3/place/around")
|
params.key = this.getGaodeKey("v3/place/around")
|
||||||
params.key = "25b2d459fd133e22f8abcebeac972692"
|
//params.key = "25b2d459fd133e22f8abcebeac972692"
|
||||||
params.offset = "100"
|
params.offset = "100"
|
||||||
json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v3/place/around", params);
|
json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v3/place/around", params);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user