|
|
|
@ -32,7 +32,7 @@ public class ManagerService { |
|
|
|
|
private int pageSize; |
|
|
|
|
|
|
|
|
|
//用户分页配置
|
|
|
|
|
@Value("${page-size.user.page-size}") |
|
|
|
|
@Value("${page-size.manager}") |
|
|
|
|
private int userPageSize; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@ -93,7 +93,7 @@ public class ManagerService { |
|
|
|
|
Page<List<ManagerRes>> page=managerMapper.count(pageSize); |
|
|
|
|
List<ManagerRes> list=managerMapper.list((queryManager.getCurrentPage()-1)*pageSize,pageSize); |
|
|
|
|
page.setBody(list); |
|
|
|
|
|
|
|
|
|
page.setCurrentPage(queryManager.getCurrentPage()); |
|
|
|
|
return new JSONResponse<DefaultRes, Page<List<ManagerRes>>>(DefaultRes.ok,Result.OK).setBody(page); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -133,6 +133,7 @@ public class ManagerService { |
|
|
|
|
*/ |
|
|
|
|
public JSONResponse<DefaultRes,Page<List<UserEntity>>> find(FindUserForm findUserForm){ |
|
|
|
|
Page<List<UserEntity>> page=userMapper.countUserByManager(userPageSize,findUserForm.getUserTypes(),findUserForm.getInfo(),findUserForm.getServiceAddress()); |
|
|
|
|
page.setCurrentPage(findUserForm.getCurrentPage()); |
|
|
|
|
List<UserEntity> userEntityList=userMapper.getPage((findUserForm.getCurrentPage()-1)* userPageSize, userPageSize,findUserForm.getUserTypes(), |
|
|
|
|
findUserForm.getInfo(),findUserForm.getServiceAddress()); |
|
|
|
|
page.setBody(userEntityList); |
|
|
|
@ -146,7 +147,8 @@ public class ManagerService { |
|
|
|
|
*/ |
|
|
|
|
public JSONResponse<DefaultRes, Page<List<ManagerActivityRes>>> findActivity(FindActivityForm findActivityForm) { |
|
|
|
|
Page<List<ManagerActivityRes>> page=activityMapper.countActivity(pageSize); |
|
|
|
|
page.setBody(activityMapper.queryActivity((findActivityForm.getCurrentPage()-1),pageSize)); |
|
|
|
|
page.setCurrentPage(findActivityForm.getCurrentPage()); |
|
|
|
|
page.setBody(activityMapper.queryActivity((findActivityForm.getCurrentPage()-1)*pageSize,pageSize)); |
|
|
|
|
return new JSONResponse<DefaultRes, Page<List<ManagerActivityRes>>>(DefaultRes.ok,Result.OK).setBody(page); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|