Nisus-Liu / clickhouse-mybatis-pager

clickhouse + mybatis-plus 时的分页拦截器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clickhouse-mybatis-pager

clickhouse + mybatis-plus 时的分页拦截器.

mybatis-plus(v3.1.2, 以下简称MP) 使用分页时, 貌似不支持. 本仓库提供使用MP时分页的解决方案. 暂只有关键的文件, 不是完整的可运行的项目.

主要类:

  • MyPaginationInterceptor mybatis 自定义分页拦截器. 用于拦截mapper方法, 处理分页逻辑.
  • MyPage 是配合使用的分页对象. 自定义分页拦截器发现mapper方法中此分页对象参数, 就会进入分页处理逻辑.

Mapper 方法中带上 MyPage 参数, 就会被自定义分页拦截器拦截并处理分页逻辑.

// FooMapper
List<FooEntity> queryPageList(MyPage<FooEntity> page, @Param("params") T otherParams );

About

clickhouse + mybatis-plus 时的分页拦截器


Languages

Language:Java 100.0%