添加AI支持

This commit is contained in:
王文艳
2026-09-11 09:10:55 +08:00
parent f6cd5acbc3
commit c3d0a39eff
3 changed files with 36 additions and 18 deletions
@@ -1127,6 +1127,9 @@ public class AddrSvcController {
} else { } else {
Integer radius = model.getRadius(); Integer radius = model.getRadius();
params.put("radius", (radius != null && radius != 0) ? radius.toString() : null); params.put("radius", (radius != null && radius != 0) ? radius.toString() : null);
if(model.getAi() != null && model.getAi() == 1){
params.put("ai", "1");
}else{
HttpServletRequest req = ActionContext.getContext().getRequest(); HttpServletRequest req = ActionContext.getContext().getRequest();
if (req != null && apiUserCfgService != null) { if (req != null && apiUserCfgService != null) {
AuthenticationBean authenticationBean = (AuthenticationBean) req.getAttribute(AuthenticationBean.ATTR_AUTHENTICATION_BEAN); AuthenticationBean authenticationBean = (AuthenticationBean) req.getAttribute(AuthenticationBean.ATTR_AUTHENTICATION_BEAN);
@@ -1140,6 +1143,7 @@ public class AddrSvcController {
} }
} }
} }
}
try { try {
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/enterpriseVillageIdentify", params, "UTF-8"); json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/enterpriseVillageIdentify", params, "UTF-8");
} catch (Exception e) { } catch (Exception e) {
@@ -95,6 +95,9 @@ public class GdBankController {
Map<String, String> params = new HashMap<String, String>(); Map<String, String> params = new HashMap<String, String>();
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null); params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null);
params.put("address", model.getAddress()); params.put("address", model.getAddress());
if(model.getAi() != null && model.getAi() == 1){
params.put("ai", "1");
}else{
HttpServletRequest req = ActionContext.getContext().getRequest(); HttpServletRequest req = ActionContext.getContext().getRequest();
if (req != null && apiUserCfgService != null) { if (req != null && apiUserCfgService != null) {
AuthenticationBean authenticationBean = (AuthenticationBean) req.getAttribute(AuthenticationBean.ATTR_AUTHENTICATION_BEAN); AuthenticationBean authenticationBean = (AuthenticationBean) req.getAttribute(AuthenticationBean.ATTR_AUTHENTICATION_BEAN);
@@ -108,6 +111,8 @@ public class GdBankController {
} }
} }
} }
}
try { try {
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/cebEnterpriseVillageIdentify", params, "UTF-8"); json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/cebEnterpriseVillageIdentify", params, "UTF-8");
} catch (Exception e) { } catch (Exception e) {
@@ -6,6 +6,7 @@ public class AddressModel extends FangjiaApiModel {
private String city; private String city;
private String address; private String address;
private Integer ai;
private String suggestDistrict; private String suggestDistrict;
private Integer businessMatch; private Integer businessMatch;
private Double area; private Double area;
@@ -334,4 +335,12 @@ public class AddressModel extends FangjiaApiModel {
public void setPage(Integer page) { public void setPage(Integer page) {
this.page = page; this.page = page;
} }
public Integer getAi() {
return ai;
}
public void setAi(Integer ai) {
this.ai = ai;
}
} }