分页功能,配置后可以使用MP分页
@Configuration
@EnableTransactionManagement
public class MybatisPlusConfig {
/**
* 分页插件
*
* @author
* @return com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// 最大单页限制数量[默认500] -1不限制
paginationInterceptor.setLimit(-1);
return paginationInterceptor;
}
}
@Override
public BaseResp appHot(AndroidAppHotParam androidAppHotParam) {
Page selectPage = new Page<>(androidAppHotParam.getCurrent(), androidAppHotParam.getSize());
Set<Integer> appVidSet = 集合
if(ObjectUtils.isEmpty(appVidSet)){
return new BaseResp(ResultStatus.SUCCESS, selectPage);
}
List<AndroidAppListDTO> androidAppListDTOList = appTagInfoMapper.appSelect(selectPage, appVidSet, androidAppHotParam.getCateId(), null);
selectPage.setRecords(androidAppListDTOList);
return new BaseResp(ResultStatus.SUCCESS, selectPage);
}
版权声明:本文为weixin_43888912原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。