地址标准化传参新增是否包含经纬度
This commit is contained in:
+2
-2
@@ -1743,7 +1743,7 @@ public class AddressController {
|
||||
|
||||
// matchParams.setUseMap(true);
|
||||
matchParams.setUseAliyunApi(true);
|
||||
matchParams.setExportLatAndLng(true);
|
||||
matchParams.setContainsLocation(model.isContainsLocation());
|
||||
Building building = addressParserService.standard(matchParams);
|
||||
Address address = building.getSearchAddress();
|
||||
UniversalDto dto = UniversalDto.newDto();
|
||||
@@ -1785,7 +1785,7 @@ public class AddressController {
|
||||
dto.append("unitNumber", address.getUnitNumber());
|
||||
dto.append("roomNumber", address.getRoomNumber());
|
||||
dto.append("formattedAddress", address.getFormattedAddress());
|
||||
if(matchParams.isExportLatAndLng()){
|
||||
if(matchParams.isContainsLocation()){
|
||||
dto.append("lat", building.getLat());
|
||||
dto.append("lng", building.getLng());
|
||||
}
|
||||
|
||||
@@ -19,6 +19,16 @@ public class AddesssMatchModel extends FangjiaApiModel {
|
||||
private String province;
|
||||
private String debugName;
|
||||
private boolean useMap;
|
||||
|
||||
public boolean isContainsLocation() {
|
||||
return containsLocation;
|
||||
}
|
||||
|
||||
public void setContainsLocation(boolean containsLocation) {
|
||||
this.containsLocation = containsLocation;
|
||||
}
|
||||
|
||||
private boolean containsLocation;
|
||||
private boolean debug;
|
||||
public String getCity() {
|
||||
return city;
|
||||
|
||||
@@ -36,7 +36,15 @@ public class AddressModel extends FangjiaApiModel {
|
||||
private Integer pageNo;
|
||||
// 是否用于检查
|
||||
private String dataLevel;
|
||||
public boolean isContainsLocation() {
|
||||
return containsLocation;
|
||||
}
|
||||
|
||||
public void setContainsLocation(boolean containsLocation) {
|
||||
this.containsLocation = containsLocation;
|
||||
}
|
||||
|
||||
private boolean containsLocation;
|
||||
public boolean isIncludeMaps() {
|
||||
return includeMaps;
|
||||
}
|
||||
|
||||
+10
-9
@@ -25,8 +25,17 @@ public class MatchParams {
|
||||
private boolean useMap;
|
||||
/**是否使用阿里云接口*/
|
||||
private boolean useAliyunApi;
|
||||
|
||||
public boolean isContainsLocation() {
|
||||
return containsLocation;
|
||||
}
|
||||
|
||||
public void setContainsLocation(boolean containsLocation) {
|
||||
this.containsLocation = containsLocation;
|
||||
}
|
||||
|
||||
/**是否输出经纬度*/
|
||||
private boolean exportLatAndLng;
|
||||
private boolean containsLocation;
|
||||
/**地址解析目的*/
|
||||
private AddressParserGoal addressParserGoal;
|
||||
|
||||
@@ -95,14 +104,6 @@ public class MatchParams {
|
||||
this.useAliyunApi = useAliyunApi;
|
||||
}
|
||||
|
||||
public boolean isExportLatAndLng() {
|
||||
return exportLatAndLng;
|
||||
}
|
||||
|
||||
public void setExportLatAndLng(boolean exportLatAndLng) {
|
||||
this.exportLatAndLng = exportLatAndLng;
|
||||
}
|
||||
|
||||
public AddressParserGoal getAddressParserGoal() {
|
||||
return addressParserGoal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user