看一下我们api文档:
{
"code": 200,
"message": "成功",
"data": {
"records": [
{
"id": 1,
"createTime": "2021-08-17 08:51:22",
"updateTime": "2021-08-17 08:52:11",
"isDeleted": 0,
"param": {},
"hosname": "北京国际医院",
"hoscode": "1000_2",
"apiUrl": "http://localhost:9999",
"signKey": "674c4137707728439a6510eae12deea9",
"contactsName": "万物",
"contactsPhone": "12888888888",
"status": 0
},
{
"id": 2,
"createTime": "2021-08-17 08:50:19",
"updateTime": "2021-08-17 08:51:58",
"isDeleted": 0,
"param": {},
"hosname": "北京妇科医院",
"hoscode": "1000_3",
"apiUrl": "1",
"signKey": "674c4137707728439a6510eae12deea9",
"contactsName": "李四",
"contactsPhone": "13888888888",
"status": 1
}
],
"total": 0,
"size": 2,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"hitCount": false,
"countId": null,
"maxLimit": null,
"searchCount": true,
"pages": 2
},
"ok": true
}
原因:
我们可以看到上面的分页插件功能已经弃用了,使用新版:
// 最新版
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
return interceptor;
}
结果:
大爷们,走之前,给个赞呗