diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java index 45b7d69a..9d9a04f9 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java @@ -218,6 +218,17 @@ public interface BaseMapper { } + /** + * 根据 map 来构建查询条件,查询多条数据 + * + * @param whereConditions 条件列表 + * @return 数据列表 + */ + default List selectListByMap(Map whereConditions, int count) { + return selectListByQuery(QueryWrapper.create().where(whereConditions).limit(count)); + } + + /** * 根据 query 来构建条件查询数据列表 *