|
@@ -43,6 +43,8 @@ public class PropertyUserService implements IPropertyUserService {
|
|
|
List<ProjectUser> projectUserList = projectService.getProjectUserList(propertyUserRequest);
|
|
|
//获取物业用户条数
|
|
|
Long projectUserCount = projectService.getProjectUserCount(propertyUserRequest);
|
|
|
+ //分页信息初始化
|
|
|
+ IPage propertyUserPage = new Page(propertyUserRequest.getPageNum(), propertyUserRequest.getPageSize());
|
|
|
if (projectUserList != null && projectUserList.size() > 0) {
|
|
|
//获取用户信息
|
|
|
List<Long> userIdList = ProjectUtils.getAttrList(projectUserList, "userId", null);
|
|
@@ -52,10 +54,10 @@ public class PropertyUserService implements IPropertyUserService {
|
|
|
"projectId", null);
|
|
|
Map<Long, ProjectInfo> projectIdToProjectInfo = projectService.getProjectIdToProjectByProjectIdList(projectIdList);
|
|
|
List<PropertyUserResponse> propertyUserResponseList = new ArrayList<>();
|
|
|
- //分页信息初始化
|
|
|
- IPage propertyUserPage = new Page(propertyUserRequest.getPageNum(), propertyUserRequest.getPageSize());
|
|
|
for (ProjectUser projectUser : projectUserList) {
|
|
|
PropertyUserResponse propertyUserResponse = new PropertyUserResponse();
|
|
|
+ //设置权限
|
|
|
+ propertyUserResponse.setUserRole(projectUser.getUserRole());
|
|
|
//封装用户信息
|
|
|
UserResponse userResponse = userIdToUserResponse.get(projectUser.getUserId());
|
|
|
if (userResponse != null) {
|
|
@@ -76,7 +78,7 @@ public class PropertyUserService implements IPropertyUserService {
|
|
|
propertyUserPage.setTotal(projectUserCount);
|
|
|
return RestResponse.success(propertyUserPage, ApiConstants.RESULT_SUCCESS, "获取物业用户成功");
|
|
|
}
|
|
|
- return RestResponse.success();
|
|
|
+ return RestResponse.success(propertyUserPage, ApiConstants.RESULT_SUCCESS, "获取信息成功");
|
|
|
}
|
|
|
|
|
|
@Override
|