Commit 2693bc00 by huangjy

fix:空间列表新增orgId

parent 531d0d2f
......@@ -18,4 +18,6 @@ public class PlatSpaceQueryDTO {
@ApiModelProperty("长者ID")
private String elderId;
@ApiModelProperty("组织机构id")
private String orgId;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.google.common.collect.Lists;
import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.vo.ExcelErrorVo;
import com.makeit.common.vo.ExcelImportVo;
......@@ -169,12 +170,17 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
@Override
public List<PlatSpaceVO> tree(PlatSpaceQueryDTO dto) {
List<String> orgIds = Lists.newArrayList();
if (StringUtil.isNotEmpty(dto.getOrgId())) {
orgIds.add(dto.getOrgId());
} else {
//查询用户权限组织id
List<PlatOrg> orgs = platOrgService.belongToScopeList(new PlatOrg());
if (orgs.isEmpty()) {
return new ArrayList<>();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
}
LambdaQueryWrapper<PlatSpace> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StringUtil.isNotEmpty(dto.getName()), PlatSpace::getName, dto.getName());
queryWrapper.in(PlatSpace::getOrgId, orgIds);
......
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 sign in to comment