Ver Fonte

添加is_delete != 1的筛选逻辑

DESKTOP-6LTVLN7\Liumouren há 4 semanas atrás
pai
commit
bcecc39941

+ 1 - 1
src/main/java/com/skyversation/poiaddr/service/AreaService.java

@@ -222,7 +222,7 @@ public class AreaService {
         if (splitAddress.getCommunity() == null) {
             splitAddress.setCommunity("");
         }
-        String sql = "select * from " + Constant.getSearchTableName() + " WHERE city like '%" + splitAddress.getCity() + "%' " +
+        String sql = "select * from " + Constant.getSearchTableName() + " WHERE is_delete != 1 and city like '%" + splitAddress.getCity() + "%' " +
                 "and county like '%" + splitAddress.getDistrict() + "%' and town like '%" + splitAddress.getStreet() + "%' " +
                 "and community like '%" + splitAddress.getCommunity() + "%' order by updatetime desc LIMIT 20";
         try {

+ 1 - 1
src/main/java/com/skyversation/poiaddr/service/impl/YyskAddressStandardizationServiceImpl.java

@@ -81,7 +81,7 @@ public class YyskAddressStandardizationServiceImpl {
                     likeStr = hjdz.substring(0,matcher.start());
                 }
                 String sql = "select sourceaddress,city,county,town,community from \n" + Constant.getSearchTableName() +
-                        "   where county = '松江区' and town is not null and sourceaddress like '%"+likeStr+"%' limit 1";
+                        "   where is_delete != 1 and county = '松江区' and town is not null and sourceaddress like '%"+likeStr+"%' limit 1";
 
                 List<Map<String, Object>> dbData = DbConnection.getInstance().runSqlStr(sql);
                 if(dbData != null && dbData.size() == 1){