Browse Source

返回数据修改

黄远 5 years ago
parent
commit
2cb400e4be

+ 1 - 1
lift-system-service/src/main/java/cn/com/ty/lift/system/user/service/impl/MtCompanyUserService.java

@@ -265,7 +265,7 @@ public class MtCompanyUserService extends ServiceImpl<MtCompanyUserMapper, MtCom
             companyUserPage.setRecords(appCompanyUserResponseList);
             return RestResponse.success(companyUserPage, ApiConstants.RESULT_SUCCESS, "获取公司用户信息成功");
         }
-        return RestResponse.success();
+        return RestResponse.success(companyUserPage, ApiConstants.RESULT_SUCCESS, "获取公司用户信息成功");
     }
 
     @Override

+ 3 - 3
lift-system-service/src/main/java/cn/com/ty/lift/system/user/service/impl/PropertyUserService.java

@@ -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,8 +54,6 @@ 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();
                 //设置权限
@@ -78,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