Procházet zdrojové kódy

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

wuxw před 6 roky
rodič
revize
570c3e3902

+ 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>");
         for (String oSql : oSqls) {
             logger.debug("处理if 节点,当前处理的oSql=" + oSql + "总的oSqls = " + oSqls);
-            if(StringUtil.isNullOrNone(oSql)){
+            if(StringUtil.isNullOrNone(oSql) || !oSql.contains("<if")){
                 continue;
             }
             if (!oSql.startsWith("<if")) {