Merge remote-tracking branch 'origin/master'

This commit is contained in:
2025-04-23 17:07:35 +08:00
@@ -2,6 +2,9 @@ package com.fangjia.script.gj.district
import com.fangjia.core.util.HttpRequest
import com.fangjia.script.temp.shenjian.util.HttpUtils
import com.fangjia.script.util.DateUtils
import com.fangjia.script.yinjihaun.util.HttpClient
import com.mongodb.BasicDBObject
import net.sf.json.JSONArray
import net.sf.json.JSONObject
@@ -401,7 +404,7 @@ class FangjiaClientUtils {
def content = null
def points = []
try {
def url = "http://192.168.0.19:31080/FangJiaNlpService/convert?locations="+URLEncoder.encode(locationstr,"UTF-8")+"&coordsys=${type}"
def url = "http://didata-uat-server.fangjia.com/FangJiaNlpService/convert?locations="+URLEncoder.encode(locationstr,"UTF-8")+"&coordsys=${type}"
content = new HttpRequest().newGet(url, null, "utf-8")
jsonObj = JSONObject.fromObject(content)
@@ -419,4 +422,26 @@ class FangjiaClientUtils {
return null;
}
static def aiResult(content){
def headers = [:]
headers.put("accept", "application/json")
headers.put("Content-Type", "application/json")
def url = "http://didata-cloud-server.fangjia.com/chat/deepseek"
try {
Map<String, String> params = new HashMap<String, String>();
params.put("content", content);
String result = HttpClient.post(url, params, headers, "utf-8", true)
println result
if (result) {
def json = JSONObject.fromObject(result)
return json
}
} catch (Exception e) {
println e.getMessage()
}
return null
}
}