|
@@ -1274,6 +1274,9 @@ public class CadastreManageServiceImpl implements CadastreManageService {
|
|
|
if(StringUtils.isNotEmpty(ywh)){
|
|
if(StringUtils.isNotEmpty(ywh)){
|
|
|
ywh = ywh.trim();
|
|
ywh = ywh.trim();
|
|
|
}
|
|
}
|
|
|
|
|
+ if (ywh.matches(".*=\\d+")) {
|
|
|
|
|
+ ywh = ywh.replaceAll("=(\\d+)", "='$1'");
|
|
|
|
|
+ }
|
|
|
List<Map<String,Object>> res = cadastreFileMapper.selectTableDataByCondition(validFlag,tableName,bsm,ywh);
|
|
List<Map<String,Object>> res = cadastreFileMapper.selectTableDataByCondition(validFlag,tableName,bsm,ywh);
|
|
|
if(CollectionUtils.isNotEmpty(res)){ //去掉geom字段和valid_flag字段
|
|
if(CollectionUtils.isNotEmpty(res)){ //去掉geom字段和valid_flag字段
|
|
|
//res.forEach(m -> m.keySet().removeIf(k -> "geom".equalsIgnoreCase(k)|| "valid_flag".equalsIgnoreCase(k)));
|
|
//res.forEach(m -> m.keySet().removeIf(k -> "geom".equalsIgnoreCase(k)|| "valid_flag".equalsIgnoreCase(k)));
|
|
@@ -1357,5 +1360,20 @@ public class CadastreManageServiceImpl implements CadastreManageService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Boolean checkQueryWhere(String tableName, String queryWhere) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (queryWhere.matches(".*=\\d+")) {
|
|
|
|
|
+ queryWhere = queryWhere.replaceAll("=(\\d+)", "='$1'");
|
|
|
|
|
+ }
|
|
|
|
|
+ String res = cadastreFileMapper.checkQueryWhere(tableName, queryWhere);
|
|
|
|
|
+ log.info("SQL语法检查结果,res: {}", res);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ throw new ServiceException("SQL语法检查异常:");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|