分页数量

This commit is contained in:
linfeng 2024-01-16 10:45:31 +08:00
parent af404eb17d
commit 4c492d98f2
2 changed files with 5 additions and 6 deletions

View File

@ -11,7 +11,6 @@
*/ */
package io.linfeng.modules.admin.controller; package io.linfeng.modules.admin.controller;
import java.util.Arrays;
import java.util.Map; import java.util.Map;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

View File

@ -259,9 +259,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
public AppPageUtils userFans(Integer currPage, Integer uid) { public AppPageUtils userFans(Integer currPage, Integer uid) {
List<Integer> uidList = followService.getFansList(uid); List<Integer> uidList = followService.getFansList(uid);
if (uidList.isEmpty()) { if (uidList.isEmpty()) {
return new AppPageUtils(null, 0, 10, currPage); return new AppPageUtils(null, 0, 20, currPage);
} }
Page<AppUserEntity> page = new Page<>(currPage, 10); Page<AppUserEntity> page = new Page<>(currPage, 20);
QueryWrapper<AppUserEntity> queryWrapper1 = new QueryWrapper<>(); QueryWrapper<AppUserEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().in(AppUserEntity::getUid, uidList); queryWrapper1.lambda().in(AppUserEntity::getUid, uidList);
Page<AppUserEntity> page1 = this.page(page, queryWrapper1); Page<AppUserEntity> page1 = this.page(page, queryWrapper1);
@ -284,9 +284,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
public AppPageUtils follow(Integer currPage, AppUserEntity user) { public AppPageUtils follow(Integer currPage, AppUserEntity user) {
List<Integer> followUids = followService.getFollowUids(user); List<Integer> followUids = followService.getFollowUids(user);
if (followUids.isEmpty()) { if (followUids.isEmpty()) {
return new AppPageUtils(null, 0, 10, currPage); return new AppPageUtils(null, 0, 20, currPage);
} }
Page<AppUserEntity> page = new Page<>(currPage, 10); Page<AppUserEntity> page = new Page<>(currPage, 20);
QueryWrapper<AppUserEntity> queryWrapper1 = new QueryWrapper<>(); QueryWrapper<AppUserEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().in(AppUserEntity::getUid, followUids); queryWrapper1.lambda().in(AppUserEntity::getUid, followUids);
Page<AppUserEntity> page1 = this.page(page, queryWrapper1); Page<AppUserEntity> page1 = this.page(page, queryWrapper1);