Commit ca4e45ce authored by yanzg's avatar yanzg

压缩视频

parent 155205f0
......@@ -561,7 +561,7 @@ public abstract class BaseDaoSql {
((InitDaoQuery) model).initCond();
}
sql = handleCodeRelease(sql, sqlData, model, codeMap);
sql = handleCodeReplace(sql, codeMap);
sql = handleCodeReplace(sqlData, sql, codeMap);
// 通过正则表达式处理参数 @name 并替换SQL语句成 ?
sql = handlePara(sql, paras, model);
......@@ -576,7 +576,7 @@ public abstract class BaseDaoSql {
* @param codeMap 替换内容
* @return Sql语句值
*/
protected String handleCodeReplace(String sql, Map<String, List<String>> codeMap) {
protected String handleCodeReplace(SqlData sqlData, String sql, Map<String, List<String>> codeMap) {
// 正则表达式匹配代码片段,并根据代码片段获取数组进行增加
String regex = "\\{.*?\\}";
Pattern p = Pattern.compile(regex);
......@@ -587,7 +587,7 @@ public abstract class BaseDaoSql {
break;
}
if (sql.length() > MAX_SQL_LENGTH) {
throw new CodeException("SQL语句过长,不能再次处理代码片段");
throw new CodeException("SQL语句" + this.getClass().getSimpleName() + "." + sqlData.getName() + "过长,不能再次处理代码片段");
}
// 寻找到的代码片段 不包含分括号
String name = m.group();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment