diff --git a/src/main/java/aiyh/utils/recordset/MapperBuilderSql.java b/src/main/java/aiyh/utils/recordset/MapperBuilderSql.java index 13fff23..505711c 100644 --- a/src/main/java/aiyh/utils/recordset/MapperBuilderSql.java +++ b/src/main/java/aiyh/utils/recordset/MapperBuilderSql.java @@ -99,12 +99,13 @@ public class MapperBuilderSql { sb.append(" where "); } for (Map.Entry 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(); } }