解决已知问题
This commit is contained in:
parent
1df178b74d
commit
efb061c5ad
|
|
@ -192,8 +192,10 @@ public class CommonService {
|
||||||
if (dataOwnCode == DataOwnEnum.SYS_FILE.code) {
|
if (dataOwnCode == DataOwnEnum.SYS_FILE.code) {
|
||||||
queryWrapper.eq(EdFileInfo::getDataOwn, DataOwnEnum.SYS_PRJ.code);
|
queryWrapper.eq(EdFileInfo::getDataOwn, DataOwnEnum.SYS_PRJ.code);
|
||||||
queryWrapper.in(EdFileInfo::getId, accessibleIds);
|
queryWrapper.in(EdFileInfo::getId, accessibleIds);
|
||||||
} else {
|
} else if(dataOwnCode == DataOwnEnum.USER_FILE.code){
|
||||||
queryWrapper.eq(EdFileInfo::getDataOwn, DataOwnEnum.USER_PRJ.code);
|
queryWrapper.eq(EdFileInfo::getDataOwn, DataOwnEnum.USER_PRJ.code);
|
||||||
|
} else {
|
||||||
|
queryWrapper.eq(EdFileInfo::getDataOwn, DataOwnEnum.REPO_PRJ.code);
|
||||||
}
|
}
|
||||||
return edFileInfoMapper.selectList(queryWrapper);
|
return edFileInfoMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -215,8 +215,11 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
||||||
List<String> strings = map.getOrDefault(querySource, new ArrayList<>());
|
List<String> strings = map.getOrDefault(querySource, new ArrayList<>());
|
||||||
List<FileProjectVO> res = new ArrayList<>();
|
List<FileProjectVO> res = new ArrayList<>();
|
||||||
strings.forEach(e -> {
|
strings.forEach(e -> {
|
||||||
FileProjectVO fileProjectVO = JSONUtil.toList(e, FileProjectVO.class).get(0);
|
List<FileProjectVO> list = JSONUtil.toList(e, FileProjectVO.class);
|
||||||
res.add(fileProjectVO);
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
FileProjectVO fileProjectVO = list.get(0);
|
||||||
|
res.add(fileProjectVO);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
res.sort(Comparator.comparing(FileProjectVO::getSort));
|
res.sort(Comparator.comparing(FileProjectVO::getSort));
|
||||||
UserThreadLocal.setSuccessInfo("", "", "查询项目层级结构成功");
|
UserThreadLocal.setSuccessInfo("", "", "查询项目层级结构成功");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.electromagnetic.industry.software.manage.service.serviceimpl;
|
package com.electromagnetic.industry.software.manage.service.serviceimpl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
|
@ -69,6 +70,9 @@ public class UserAccessLogServiceImpl extends ServiceImpl<UserAccessLogMapper, U
|
||||||
private void setOtherInfo(List<AccessLogQueryVO> res) {
|
private void setOtherInfo(List<AccessLogQueryVO> res) {
|
||||||
|
|
||||||
List<String> userIds = res.stream().map(AccessLogQueryVO::getUserId).collect(Collectors.toList());
|
List<String> userIds = res.stream().map(AccessLogQueryVO::getUserId).collect(Collectors.toList());
|
||||||
|
if (CollUtil.isEmpty(userIds)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
LambdaQueryWrapper<User> wrapper = Wrappers.lambdaQuery(User.class).select(User::getUserId, User::getUserName).in(User::getUserId, userIds);
|
LambdaQueryWrapper<User> wrapper = Wrappers.lambdaQuery(User.class).select(User::getUserId, User::getUserName).in(User::getUserId, userIds);
|
||||||
Map<String, String> idNameMap = userMapper.selectList(wrapper).stream().collect(Collectors.toMap(User::getUserId, User::getUserName));
|
Map<String, String> idNameMap = userMapper.selectList(wrapper).stream().collect(Collectors.toMap(User::getUserId, User::getUserName));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue