分页数量

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;
import java.util.Arrays;
import java.util.Map;
import io.swagger.annotations.Api;
@ -76,7 +75,7 @@ public class AppUserController {
return R.ok();
}
@GetMapping("/ban/{id}")

View File

@ -259,9 +259,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
public AppPageUtils userFans(Integer currPage, Integer uid) {
List<Integer> uidList = followService.getFansList(uid);
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<>();
queryWrapper1.lambda().in(AppUserEntity::getUid, uidList);
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) {
List<Integer> followUids = followService.getFollowUids(user);
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<>();
queryWrapper1.lambda().in(AppUserEntity::getUid, followUids);
Page<AppUserEntity> page1 = this.page(page, queryWrapper1);