Merge branch 'open_gj' into 'master'

回退版本

See merge request !699
This commit is contained in:
2023-07-31 20:05:04 +08:00
@@ -179,7 +179,7 @@ public class AddrSvcController {
/** /**
* 地址匹配 * 地址匹配
*/ */
public Object matchAction(AddesssMatchModel model) { public Object matchAction(AddesssMatchModel model) throws Exception {
RestfulModelAndView mav = new RestfulModelAndView(); RestfulModelAndView mav = new RestfulModelAndView();
if (StringUtils.isBlank(model.getAddress())) { if (StringUtils.isBlank(model.getAddress())) {
@@ -195,18 +195,13 @@ public class AddrSvcController {
params.put("category", model.getCategory()); params.put("category", model.getCategory());
params.put("district", model.getSuggestDistrict()); params.put("district", model.getSuggestDistrict());
try { try {
// json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/match", params, "UTF-8");
//新匹配接口 //新匹配接口
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8"); json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
if (json != null) { if (json != null && json.size()>0) {
int code = json.getInt("status"); BasicModel basicModel = new BasicModel(0, "ok");
String msg = json.getString("msg"); basicModel.setResult(CommonDtoUtils.transformV(MatchedBuildingDto.class, json));
BasicModel basicModel = new BasicModel(code, msg);
if (json.containsKey("result")) {
basicModel.setResult(CommonDtoUtils.transformV(MatchedBuildingDto.class, json.get("result")));
}
mav.setModel(basicModel); mav.setModel(basicModel);
} else { }else {
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中...")); mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
} }
} catch (Exception e) { } catch (Exception e) {