Browse Source

修复获取列名时,替换 where 中参数的错误处理

sunyj 8 years ago
parent
commit
d0ee4a0cdd
1 changed files with 0 additions and 4 deletions
  1. 0 4
      src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

+ 0 - 4
src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

@@ -357,10 +357,6 @@ public class PrintServiceImpl implements PrintService {
 			if (queryString.contains("$P!{WHERE_CONDITION}")) {
 				queryString = queryString.replace("$P!{WHERE_CONDITION}", "where rownum = 0");
 			}
-			// 如果查询语句中含有where条件,则可能有用到一些参数,需将其替换掉
-			else if (queryString.toUpperCase().contains("WHERE")) {
-				queryString = queryString.substring(0, queryString.toUpperCase().indexOf("WHERE")) + "where rownum = 0";
-			}
 			queryString = replaceOtherParameters(queryString, otherParameters);
 			List<String> columnNames = getColumnNames(connection, queryString);
 			if (CollectionUtils.isEmpty(columnNames)) {