From 77d2ec052791643e8f192249216780d073001baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Sun, 20 Sep 2026 13:56:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0AI=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../open/controllers/AddrSvcController.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddrSvcController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddrSvcController.java index dbdfb3852..f328b4172 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddrSvcController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddrSvcController.java @@ -572,6 +572,23 @@ public class AddrSvcController { params.put("address", address); String type = StringUtils.isNotBlank(model.getType()) ? model.getType() : null; params.put("type", type); + if (model.getAi() != null && model.getAi() == 1) { + params.put("ai", "1"); + } else { + HttpServletRequest req = ActionContext.getContext().getRequest(); + if (req != null && apiUserCfgService != null) { + AuthenticationBean authenticationBean = (AuthenticationBean) req.getAttribute(AuthenticationBean.ATTR_AUTHENTICATION_BEAN); + if (authenticationBean != null && authenticationBean.apiUser != null) { + ApiUserCfg apiUserCfg = apiUserCfgService.findByUserId(authenticationBean.apiUser.getId(), ApiUserCfg.ApiUserCfgKey.ENTERPRISE_VILLAGE_AI); + if (apiUserCfg != null && apiUserCfg.getCfgValue() != null) { + String aiVal = apiUserCfg.getCfgValue().toString(); + if ("1".equals(aiVal) || "true".equalsIgnoreCase(aiVal)) { + params.put("ai", "1"); + } + } + } + } + } try { json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v6/villageIdentify", params, "UTF-8"); } catch (Exception e) {