ソースを参照

优化if 标签后还有数据的情况

wuxw 6 年 前
コミット
570c3e3902
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java

+ 1 - 1
java110-service/src/main/java/com/java110/service/smo/impl/QueryServiceSMOImpl.java

@@ -344,7 +344,7 @@ public class QueryServiceSMOImpl extends LoggerEngine implements IQueryServiceSM
         String[] oSqls = oldSql.split("</if>");
         String[] oSqls = oldSql.split("</if>");
         for (String oSql : oSqls) {
         for (String oSql : oSqls) {
             logger.debug("处理if 节点,当前处理的oSql=" + oSql + "总的oSqls = " + oSqls);
             logger.debug("处理if 节点,当前处理的oSql=" + oSql + "总的oSqls = " + oSqls);
-            if(StringUtil.isNullOrNone(oSql)){
+            if(StringUtil.isNullOrNone(oSql) || !oSql.contains("<if")){
                 continue;
                 continue;
             }
             }
             if (!oSql.startsWith("<if")) {
             if (!oSql.startsWith("<if")) {