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