zhanghan 2 săptămâni în urmă
părinte
comite
bbfb260163

+ 1 - 1
src/main/java/com/skyversation/poiaddr/addquery/AddressQueryEngine.java

@@ -271,7 +271,7 @@ public class AddressQueryEngine {
      * yysz_address地名搜索
      */
     public AddressResult yyszSearchByName(String address){
-        ResponseEntity response = AddressNetTools.getInstance().requestGet(yyszAddressService+"/search/searchByName?address="+address, null, null, 10);
+        ResponseEntity response = AddressNetTools.getInstance().requestGet(yyszAddressService+"/search/searchByNameV3?address="+address, null, null, 10);
         if (response != null) {
             String body = response.getBody() + "";
             if (!StringUtils.hasText(body))

+ 5 - 5
src/main/java/com/skyversation/poiaddr/config/WebConfig.java

@@ -6,9 +6,9 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 @Configuration
 public class WebConfig implements WebMvcConfigurer {
 
-    @Override
-    public void addInterceptors(InterceptorRegistry registry) {
-        registry.addInterceptor(new AuthInterceptor())
-                .addPathPatterns("/**"); // 拦截所有请求
-    }
+//    @Override
+//    public void addInterceptors(InterceptorRegistry registry) {
+//        registry.addInterceptor(new AuthInterceptor())
+//                .addPathPatterns("/**"); // 拦截所有请求
+//    }
 }

+ 0 - 23
src/main/java/com/skyversation/poiaddr/util/ExcelReaderUtils.java

@@ -1,7 +1,6 @@
 package com.skyversation.poiaddr.util;
 
 import com.skyversation.poiaddr.addquery.Constant;
-import com.skyversation.poiaddr.ignore.YyszAddressV3;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.ss.usermodel.*;
 
@@ -63,28 +62,6 @@ public class ExcelReaderUtils {
         }
     }
 
-    public static void writeYToExcel(List<YyszAddressV3> target,String filePath) throws IOException {
-
-        List<Map<String, Object>> excel = new ArrayList<>();
-        for (YyszAddressV3 address : target) {
-            Map<String, Object> row = new HashMap<>();
-            row.put("oid", address.getId() == null ? "" : address.getId().toString());
-            row.put("sourceaddress", address.getSourceaddress() == null ? "" : address.getSourceaddress());
-            row.put("city", address.getCity() == null ? "" : address.getCity());
-            row.put("county", address.getCounty() == null ? "" : address.getCounty());
-            row.put("Createtime", address.getCreatetime() == null ? "" : address.getCreatetime().toString());
-            row.put("no1", address.getNo1() == null ? "" : address.getNo1());
-            row.put("lon", address.getLon() == null ? "" : address.getLon().toString());
-            row.put("lat", address.getLat() == null ? "" : address.getLat().toString());
-            row.put("x", address.getX() == null ? "" : address.getX());
-            row.put("y", address.getY() == null ? "" : address.getY());
-            row.put("town", address.getTown() == null ? "" : address.getTown());
-            row.put("community", address.getCommunity() == null ? "" : address.getCommunity());
-            excel.add(row);
-        }
-        writeToExcel(excel,filePath);
-    }
-
     public static List<Map<String, Object>> readExcel(String filePath) throws IOException {
         List<Map<String, Object>> resultList = new ArrayList<>();
         FileInputStream fis = new FileInputStream(filePath);

+ 6 - 4
src/main/resources/application.properties

@@ -4,9 +4,11 @@ spring.application.name=poiAddr
 spring.servlet.multipart.max-file-size=300MB
 spring.servlet.multipart.max-request-size=300MB
 # \u6570\u636E\u5E93\u914D\u7F6E\uFF08\u672C\u5730\u8C03\u8BD5\u73AF\u5883\uFF09
-spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/postgres?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
-spring.datasource.username=postgres
-spring.datasource.password=417512
+
+spring.datasource.url=jdbc:postgresql://${DMS_DB_IP:121.43.55.7}:${DMS_DB_PORT:5433}/${ADDRESS_DB_TABLE_NAME:address}?stringtype=unspecified&u003fuseUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&serverTimezone=PRC&useSSL=false&tinyInt1isBit=false&postgis=true
+spring.datasource.username=${DMS_DB_ACCOUNT:yysz}
+spring.datasource.password=${DMS_DB_PASSWORD:Yysz@1234}
+
 spring.datasource.driver-class-name=org.postgresql.Driver
 # \u6570\u636E\u5E93\u8FDE\u63A5\u4FE1\u606F\uFF08\u5F00\u53D1\u73AF\u5883\uFF09
 #spring.datasource.url=jdbc:transwarp2://172.30.75.126:31768/dws
@@ -31,7 +33,7 @@ app.area=\u9752\u6D66
 app.town=\u6731\u5BB6\u89D2\u9547\u3001\u8D75\u5DF7\u9547\u3001\u5F90\u6CFE\u9547\u3001\u534E\u65B0\u9547\u3001\u91CD\u56FA\u9547\u3001\u767D\u9E64\u9547\u3001\u7EC3\u5858\u9547\u3001\u91D1\u6CFD\u9547\u3001\u590F\u9633\u8857\u9053\u3001\u76C8\u6D66\u8857\u9053\u3001\u9999\u82B1\u6865\u8857\u9053
 
 app.net-type=${NET_TYPE:internet}
-app.yysz-address-service=${YYSZ_POI_SERVICE:http://127.0.0.1:10012/poi}
+app.yysz-address-service=${YYSZ_POI_SERVICE:http://121.43.55.7:10013/address}
 #
 #logging.level.org.hibernate=DEBUG
 #logging.level.org.springframework=DEBUG