国信所需接口封装
This commit is contained in:
+6
-3
@@ -86,7 +86,7 @@ public class AddrSvcController {
|
|||||||
if (json != null) {
|
if (json != null) {
|
||||||
int code = json.getInt("status");
|
int code = json.getInt("status");
|
||||||
String msg = json.getString("msg");
|
String msg = json.getString("msg");
|
||||||
BasicModel basicModel = new BasicModel(code, msg);
|
BasicModel basicModel = new BasicModel(code == 0 ? 200 : 0, msg);
|
||||||
if (json.containsKey("result")) {
|
if (json.containsKey("result")) {
|
||||||
JSONObject result = json.getJSONObject("result");
|
JSONObject result = json.getJSONObject("result");
|
||||||
result.remove("formatAddress");
|
result.remove("formatAddress");
|
||||||
@@ -127,7 +127,7 @@ public class AddrSvcController {
|
|||||||
if (json != null) {
|
if (json != null) {
|
||||||
int code = json.getInt("status");
|
int code = json.getInt("status");
|
||||||
String msg = json.getString("msg");
|
String msg = json.getString("msg");
|
||||||
BasicModel basicModel = new BasicModel(code, msg);
|
BasicModel basicModel = new BasicModel(code == 0 ? 200 : 0, msg);
|
||||||
if (json.containsKey("result")) {
|
if (json.containsKey("result")) {
|
||||||
DistrictIdentifyDto districtIdentifyDto = CommonDtoUtils.transformV(DistrictIdentifyDto.class, json.get("result"));
|
DistrictIdentifyDto districtIdentifyDto = CommonDtoUtils.transformV(DistrictIdentifyDto.class, json.get("result"));
|
||||||
JSONObject result = json.getJSONObject("result");
|
JSONObject result = json.getJSONObject("result");
|
||||||
@@ -284,7 +284,7 @@ public class AddrSvcController {
|
|||||||
JSONObject json = null;
|
JSONObject json = null;
|
||||||
Map<String, String> params = new HashMap<String, String>();
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
params.put("city", model.getCity());
|
params.put("city", model.getCity());
|
||||||
params.put("region", model.getRegion());
|
params.put("district", model.getRegion());
|
||||||
params.put("keywords", model.getKeywords());
|
params.put("keywords", model.getKeywords());
|
||||||
params.put("page", "0");
|
params.put("page", "0");
|
||||||
params.put("offset", String.valueOf(model.getMax() == 0 ? 10 : (model.getMax() > 100 ? 100 : model.getMax())));
|
params.put("offset", String.valueOf(model.getMax() == 0 ? 10 : (model.getMax() > 100 ? 100 : model.getMax())));
|
||||||
@@ -969,6 +969,7 @@ public class AddrSvcController {
|
|||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Object addressAssociationAction(AddressModel model) {
|
public Object addressAssociationAction(AddressModel model) {
|
||||||
|
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
@@ -1111,6 +1112,7 @@ public class AddrSvcController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 区域级行政区划查询接口
|
* 区域级行政区划查询接口
|
||||||
|
*
|
||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -1160,6 +1162,7 @@ public class AddrSvcController {
|
|||||||
}
|
}
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object listTownshipAction(AddressModel model) {
|
public Object listTownshipAction(AddressModel model) {
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
HttpRequest request = new HttpRequest();
|
HttpRequest request = new HttpRequest();
|
||||||
|
|||||||
Reference in New Issue
Block a user