Merge branch 'open_gj' into 'master'

Open gj

See merge request !192
This commit is contained in:
2021-11-18 09:48:35 +08:00
2 changed files with 3 additions and 2 deletions
@@ -2774,7 +2774,7 @@ public class AddressController {
if (json.getInt("code") == 200) {
JSONObject resultJson = json.getJSONObject("result");
JSONObject searchAddress = resultJson.getJSONObject("searchAddress");
if (resultJson.getInt("credit") > 0) {
if (resultJson.getDouble("credit") > 0) {
District district = districtService.findByNameAndAlias(resultJson.getString("city"), resultJson.getString("district"), resultJson.getString("name"), "district");
if (district != null) {
resultMap.put("riskLevel", "A");
@@ -155,7 +155,8 @@ public class AddressMatchProxyServiceImpl extends AbstractHttpApiService impleme
params.put("city", city);
params.put("output", "json");
params.put("keywords", address);
params.put("key", "4ccfe3c898a9489884bd2bcb1ef6dcde");
// 此key单独用
params.put("key", "35925efd7333f1df52145e51b8e4e56a");
try {
JSONObject result = request.getJsonContent("http://restapi.amap.com/v3/place/text", params, "UTF-8");
if (result != null && result.getInt("status") != 1) {