baomidou / mybatis-plus

An powerful enhanced toolkit of MyBatis for simplify development
https://baomidou.com
Apache License 2.0
16.47k stars 4.31k forks source link

[功能改进]: 分页参数 `IPage` 支持在 `Map` 参数中生效 #6511

Open loren-coding opened 2 months ago

loren-coding commented 2 months ago

确认

功能改进

分页参数 IPage 支持在 Map 参数中生效。方便兼容陈年旧代码如:

      Map<String, Object> map = Map.of(
            "pageable", new Page<>(),
            "name", "mybatis-plus",
            "age", 18
      );
     userMapper.testPage(map);

     ...

     //------ UserMapper.java ------
     @Select("select * from h2user where name=#{name}")
     IPage<H2User> testPage(Map<String, Object> param);

参考资料

No response

loren-coding commented 2 months ago

@nieqiurong @miemieYaho 单元测试已经通过:https://github.com/baomidou/mybatis-plus/pull/6512