💡 修改分页内容
This commit is contained in:
parent
c25e96b93d
commit
9d29b21171
|
@ -28,7 +28,7 @@ import java.util.List;
|
|||
*/
|
||||
@Tag(name = "用户基本信息表", description = "用户基本信息表相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/api/coupon/user")
|
||||
@RequestMapping("/api/user")
|
||||
@RequiredArgsConstructor
|
||||
public class UserController {
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class UserController {
|
|||
UserDto dto) {
|
||||
Page<UserEntity> pageParams = new Page<>(page, limit);
|
||||
PageResult<UserVo> pageResult = userService.getUserPage(pageParams, dto);
|
||||
return Result.success(pageResult);
|
||||
return Result.success(pageResult, ResultCodeEnum.LOAD_FINISHED);
|
||||
}
|
||||
|
||||
@Operation(summary = "添加用户基本信息表", description = "添加用户基本信息表")
|
||||
|
|
|
@ -4,7 +4,7 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class LoginController {
|
||||
public class WebController {
|
||||
|
||||
@GetMapping("")
|
||||
public String indexPage() {
|
||||
|
@ -15,4 +15,9 @@ public class LoginController {
|
|||
public String showLoginPage() {
|
||||
return "login";
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/user")
|
||||
public String showUserPage() {
|
||||
return "user/index";
|
||||
}
|
||||
}
|
|
@ -19,9 +19,6 @@ public class UserVo {
|
|||
@Schema(name = "username", title = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(name = "email", title = "邮箱")
|
||||
private String email;
|
||||
|
||||
|
@ -37,8 +34,5 @@ public class UserVo {
|
|||
@Schema(name = "updateUser", title = "更新用户ID")
|
||||
private Long updateUser;
|
||||
|
||||
@Schema(name = "isDeleted", title = "是否被删除")
|
||||
private Boolean isDeleted;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ public class PageResult<T> implements Serializable {
|
|||
@Schema(name = "pageSize", title = "每页记录数")
|
||||
private Long pageSize;
|
||||
|
||||
@Schema(name = "pages", title = "总分页数")
|
||||
private Long pages;
|
||||
|
||||
@Schema(name = "total", title = "总记录数")
|
||||
private Long total;
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permiss
|
|||
.list(page.getRecords())
|
||||
.pageNo(page.getCurrent())
|
||||
.pageSize(page.getSize())
|
||||
.pages(page.getPages())
|
||||
.total(page.getTotal())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper,
|
|||
.list(page.getRecords())
|
||||
.pageNo(page.getCurrent())
|
||||
.pageSize(page.getSize())
|
||||
.pages(page.getPages())
|
||||
.total(page.getTotal())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, RoleEntity> impleme
|
|||
.list(page.getRecords())
|
||||
.pageNo(page.getCurrent())
|
||||
.pageSize(page.getSize())
|
||||
.pages(page.getPages())
|
||||
.total(page.getTotal())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRoleEnt
|
|||
.list(page.getRecords())
|
||||
.pageNo(page.getCurrent())
|
||||
.pageSize(page.getSize())
|
||||
.pages(page.getPages())
|
||||
.total(page.getTotal())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -45,10 +45,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
|
|||
public PageResult<UserVo> getUserPage(Page<UserEntity> pageParams, UserDto dto) {
|
||||
IPage<UserVo> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
|
||||
return PageResult.<UserVo>builder()
|
||||
.list(page.getRecords())
|
||||
.pageNo(page.getCurrent())
|
||||
.pageSize(page.getSize())
|
||||
.pages(page.getPages())
|
||||
.total(page.getTotal())
|
||||
.build();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue