mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
fixed Db.paginate
This commit is contained in:
parent
e15de1ac9f
commit
c8ec84a4d3
@ -18,7 +18,6 @@ package com.mybatisflex.core.row;
|
||||
import com.mybatisflex.core.FlexConsts;
|
||||
import com.mybatisflex.core.exception.FlexExceptions;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.provider.EntitySqlProvider;
|
||||
import com.mybatisflex.core.provider.RowSqlProvider;
|
||||
import com.mybatisflex.core.query.CPI;
|
||||
import com.mybatisflex.core.query.QueryColumn;
|
||||
@ -198,7 +197,7 @@ public interface RowMapper {
|
||||
* 更新 entity,主要用于进行批量更新的场景
|
||||
* @param entity 实体类
|
||||
* @see RowSqlProvider#updateEntity(Map)
|
||||
* @see RowMapperInvoker#updateBatchEntity(Collection, int)
|
||||
* @see Db#updateBatchEntity(Collection, int)
|
||||
*/
|
||||
@UpdateProvider(value = RowSqlProvider.class, method = "updateEntity")
|
||||
int updateEntity(@Param(FlexConsts.ENTITY) Object entity);
|
||||
@ -367,7 +366,7 @@ public interface RowMapper {
|
||||
* @return 数据列表
|
||||
* @see RowSqlProvider#selectObjectByQuery(Map)
|
||||
*/
|
||||
@SelectProvider(type = EntitySqlProvider.class, method = "selectObjectByQuery")
|
||||
@SelectProvider(type = RowSqlProvider.class, method = "selectObjectByQuery")
|
||||
List<Object> selectObjectListByQuery(@Param(FlexConsts.TABLE_NAME) String tableName, @Param(FlexConsts.QUERY) QueryWrapper queryWrapper);
|
||||
|
||||
|
||||
|
||||
@ -18,6 +18,8 @@ package com.mybatisflex.test;
|
||||
import com.mybatisflex.core.MybatisFlexBootstrap;
|
||||
import com.mybatisflex.core.audit.AuditManager;
|
||||
import com.mybatisflex.core.audit.ConsoleMessageCollector;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.row.Db;
|
||||
import com.mybatisflex.core.row.Row;
|
||||
import com.mybatisflex.core.row.RowKey;
|
||||
@ -48,6 +50,9 @@ public class RowTestStarter {
|
||||
AuditManager.setAuditEnable(true);
|
||||
AuditManager.setMessageCollector(new ConsoleMessageCollector());
|
||||
|
||||
Page<Row> rowPage = Db.paginate("tb_account", 1, 10, QueryWrapper.create());
|
||||
System.out.println(rowPage);
|
||||
|
||||
|
||||
//查询 ID 为 1 的数据
|
||||
// Row row = Db.selectOneById("tb_account", "id", 1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user