mapper拼接类

jingwei
youhong.ai 2023-05-12 21:14:04 +08:00
parent 8b8ab74483
commit ad6c60dc9f
1 changed files with 3 additions and 2 deletions

View File

@ -99,12 +99,13 @@ public class MapperBuilderSql {
sb.append(" where ");
}
for (Map.Entry<String, Object> entry : param.entrySet()) {
sb.append(entry.getKey()).append(" and ").append("#{");
sb.append(entry.getKey()).append(" = #{");
if (StrUtil.isNotBlank(wherePrefix)) {
sb.append(wherePrefix).append(".");
}
sb.append(entry.getKey()).append("}");
sb.append(entry.getKey()).append("}").append(" and ");
}
sb.deleteCharAt(sb.length() - 5);
return sb.toString();
}
}