升级代码版本后,用户管理打开报错,达梦数据库

熊旭

回答2

完善修改:

@Override
    public PageResult<AdminUserDO> getUserPage(UserPageReqVO reqVO) {
        // 有部门编号时,获得部门(含子部门)对应的用户编号
        Set<Long> deptIds = getDeptCondition(reqVO.getDeptId());
        Set<Long> userIds = null;
        if (CollUtil.isNotEmpty(deptIds)) {   //  指定部门时,查询部门对应的用户编号
            Collection<String> stringDeptIds = deptIds.stream()
                    .map(String::valueOf)
                    .collect(Collectors.toList());
            userIds = convertSet(userDeptMapper.selectListBydeptIds(stringDeptIds), UserDeptDO::getUserId);
            if (CollUtil.isEmpty(userIds)) {  //  指定部门但无用户,直接返回空分页
                return PageResult.empty();
            }
        }
        return userMapper.selectPage(reqVO, userIds);
    }


写回答

扫码关注

微信公众号二维码