Commit 46737e82 by yangyang

全国poi检索提交

parent 4f0fa841
package com.founder.commonutils.model.newPublicEntity;
public class AddressPoiResult {
private String dataType;
private String dz;
private String id;
private String layer;
private String location;
private Otherfields otherfields;
private String score;
private String x;
private String y;
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getDz() {
return dz;
}
public void setDz(String dz) {
this.dz = dz;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLayer() {
return layer;
}
public void setLayer(String layer) {
this.layer = layer;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public Otherfields getOtherfields() {
return otherfields;
}
public void setOtherfields(Otherfields otherfields) {
this.otherfields = otherfields;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
public String getX() {
return x;
}
public void setX(String x) {
this.x = x;
}
public String getY() {
return y;
}
public void setY(String y) {
this.y = y;
}
@Override
public String toString() {
return "AddressPoiResult{" +
"dataType='" + dataType + '\'' +
", dz='" + dz + '\'' +
", id='" + id + '\'' +
", layer='" + layer + '\'' +
", location='" + location + '\'' +
", otherfields=" + otherfields +
", score='" + score + '\'' +
", x='" + x + '\'' +
", y='" + y + '\'' +
'}';
}
}
package com.founder.commonutils.model.newPublicEntity;
public class Otherfields {
private String dzzymc_pinyin;
private String x;
private String y;
private String address;
private String updatetime;
private String azname;
private String sjly;
public String getDzzymc_pinyin() {
return dzzymc_pinyin;
}
public void setDzzymc_pinyin(String dzzymc_pinyin) {
this.dzzymc_pinyin = dzzymc_pinyin;
}
public String getX() {
return x;
}
public void setX(String x) {
this.x = x;
}
public String getY() {
return y;
}
public void setY(String y) {
this.y = y;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getUpdatetime() {
return updatetime;
}
public void setUpdatetime(String updatetime) {
this.updatetime = updatetime;
}
public String getAzname() {
return azname;
}
public void setAzname(String azname) {
this.azname = azname;
}
public String getSjly() {
return sjly;
}
public void setSjly(String sjly) {
this.sjly = sjly;
}
@Override
public String toString() {
return "Otherfields{" +
"dzzymc_pinyin='" + dzzymc_pinyin + '\'' +
", x='" + x + '\'' +
", y='" + y + '\'' +
", address='" + address + '\'' +
", updatetime='" + updatetime + '\'' +
", azname='" + azname + '\'' +
", sjly='" + sjly + '\'' +
'}';
}
}
......@@ -3,6 +3,8 @@ package com.founder.commonutils.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.AddressPoiResult;
import com.founder.commonutils.model.newPublicEntity.Otherfields;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......
......@@ -3,6 +3,10 @@ package com.founder.publicapi.controller.SkInterface;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.JsResult;
import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import com.founder.commonutils.model.vo.param.JsParams;
import com.founder.commonutils.util.AddressPoiUtil;
import com.founder.servicebase.logs.OperLog;
import com.founder.servicebase.logs.OperationType;
import io.swagger.annotations.Api;
......@@ -11,9 +15,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@Api(description = "公共热力图检索接口管理")
@Api(description = "poi检索")
@RestController
@RequestMapping("/publicJs")
public class JsController {
......@@ -24,7 +29,7 @@ public class JsController {
@OperLog(message = "地址",operation = OperationType.QUERY)
@ApiOperation(value = "地址")
@PostMapping(value = "/poiname")
public MapRestResult poiname(JsParams jsParams) throws Exception {
public MapRestResult poiname(@RequestBody JsParams jsParams) throws Exception {
List<JsResult> listResult = new ArrayList<>();
String result = addressPoiUtil.getData(jsParams.getLikeValue(), jsParams.getPage(), jsParams.getPageSize());
JSONObject jsonObject = JSON.parseObject(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment