Commit 7292e6fd authored by liuyang's avatar liuyang

企业列表增加成员数量获取

parent 38e37858
...@@ -118,4 +118,9 @@ public class MemberService { ...@@ -118,4 +118,9 @@ public class MemberService {
extUserPO.setUserId(userId); extUserPO.setUserId(userId);
sysUserExtMapper.update(extUserPO, Wrappers.<SysUserExtPO>lambdaUpdate().eq(SysUserExtPO::getUserId,userId)); sysUserExtMapper.update(extUserPO, Wrappers.<SysUserExtPO>lambdaUpdate().eq(SysUserExtPO::getUserId,userId));
} }
public int countByEnterpriseId(Long enterpriseId) {
int count = sysUserExtMapper.selectCount(Wrappers.<SysUserExtPO>lambdaQuery().eq(SysUserExtPO::getEnterpriseId,enterpriseId));
return count;
}
} }
...@@ -80,7 +80,10 @@ public class OrganizationService extends BaseServiceImpl<OrganizationMapper, Org ...@@ -80,7 +80,10 @@ public class OrganizationService extends BaseServiceImpl<OrganizationMapper, Org
public PageResult<EnterpriseListItemModel> queryEnterprisePageList(QueryEnterpriseModel param) { public PageResult<EnterpriseListItemModel> queryEnterprisePageList(QueryEnterpriseModel param) {
Page page = new Page(param.getPageIndex(),param.getPageSize()); Page page = new Page(param.getPageIndex(),param.getPageSize());
List<EnterpriseListItemModel> list = baseMapper.queryEnterprisePageList(page,param); List<EnterpriseListItemModel> list = baseMapper.queryEnterprisePageList(page,param);
//TODO 获取成员数量 for (EnterpriseListItemModel model : list){
int count = memberService.countByEnterpriseId(model.getId());
model.setMemberCount(count);
}
return PageResult.<EnterpriseListItemModel>builder().code(CodeEnum.SUCCESS.getCode()).count(page.getTotal()).data(list).build(); return PageResult.<EnterpriseListItemModel>builder().code(CodeEnum.SUCCESS.getCode()).count(page.getTotal()).data(list).build();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment