Commit ae1c828d authored by yanzg's avatar yanzg

参数的支持

parent c4ae7c42
......@@ -410,13 +410,13 @@ public abstract class BaseDaoSql {
// 写入参数到对象中
mapPara.put(field.paraName, val);
// 判断是否属于条件
boolean isCondtion = field.codes.size() > 0 && field.auto;
boolean isCond = field.codes.size() > 0 && field.auto;
// 处理参数
if (!isCondtion) {
if (!isCond) {
// 进行SQL语句参数替换,后面增加一个空格,方便后续用正则表达式进行替换处理
sql = sql.replaceFirst("\\?", "@" + field.paraName + " ");
}
if (isCondtion && StringHelper.isEmpty(val)) {
if (isCond && StringHelper.isEmpty(val)) {
continue;
}
}
......
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