前端:重构管理员模块~
This commit is contained in:
@@ -9,25 +9,25 @@ import java.util.List;
|
||||
public class AdminPageVO {
|
||||
|
||||
@ApiModelProperty(value = "管理员数组")
|
||||
private List<AdminVO> admins;
|
||||
private List<AdminVO> list;
|
||||
@ApiModelProperty(value = "管理员总数")
|
||||
private Integer count;
|
||||
private Integer total;
|
||||
|
||||
public List<AdminVO> getAdmins() {
|
||||
return admins;
|
||||
public List<AdminVO> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public AdminPageVO setAdmins(List<AdminVO> admins) {
|
||||
this.admins = admins;
|
||||
public AdminPageVO setList(List<AdminVO> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public AdminPageVO setCount(Integer count) {
|
||||
this.count = count;
|
||||
public AdminPageVO setTotal(Integer total) {
|
||||
this.total = total;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,27 +7,27 @@ public class AdminPageBO {
|
||||
/**
|
||||
* 管理员数组
|
||||
*/
|
||||
private List<AdminBO> admins;
|
||||
private List<AdminBO> list;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer count;
|
||||
private Integer total;
|
||||
|
||||
public List<AdminBO> getAdmins() {
|
||||
return admins;
|
||||
public List<AdminBO> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public AdminPageBO setAdmins(List<AdminBO> admins) {
|
||||
this.admins = admins;
|
||||
public AdminPageBO setList(List<AdminBO> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public AdminPageBO setCount(Integer count) {
|
||||
this.count = count;
|
||||
public AdminPageBO setTotal(Integer total) {
|
||||
this.total = total;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@ public class AdminServiceImpl implements AdminService {
|
||||
public CommonResult<AdminPageBO> getAdminPage(AdminPageDTO adminPageDTO) {
|
||||
AdminPageBO adminPage = new AdminPageBO();
|
||||
// 查询分页数据
|
||||
int offset = adminPageDTO.getPageNo() * adminPageDTO.getPageSize();
|
||||
adminPage.setAdmins(AdminConvert.INSTANCE.convert(adminMapper.selectListByNicknameLike(adminPageDTO.getNickname(),
|
||||
int offset = (adminPageDTO.getPageNo() - 1) * adminPageDTO.getPageSize();
|
||||
adminPage.setList(AdminConvert.INSTANCE.convert(adminMapper.selectListByNicknameLike(adminPageDTO.getNickname(),
|
||||
offset, adminPageDTO.getPageSize())));
|
||||
// 查询分页总数
|
||||
adminPage.setCount(adminMapper.selectCountByNicknameLike(adminPageDTO.getNickname()));
|
||||
adminPage.setTotal(adminMapper.selectCountByNicknameLike(adminPageDTO.getNickname()));
|
||||
return CommonResult.success(adminPage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user