细节调整

This commit is contained in:
陈超
2022-08-09 14:04:59 +08:00
parent 10071af599
commit 17fbda2d47
2 changed files with 5 additions and 4 deletions

View File

@@ -14,7 +14,7 @@
<select id="selectDeptListName" resultType="Dept">
SELECT `Id` deptId, `Name` deptName
FROM sys_dept
WHERE Id IN
WHERE State = 1 AND Id IN
<foreach item="item" collection="deptIndexes" open="(" separator="," close=")">
#{item}
</foreach>

View File

@@ -43,8 +43,10 @@ public class DeptMapServiceImpl implements DeptMapService {
for (DeptMap dept: deptMaps) {
DeptConfigVO configVO = new DeptConfigVO();
BeanUtils.copyProperties(dept, configVO);
configVO.setDeptName(
deptList.stream().filter(item -> item.getDeptId().equals(configVO.getDeptId())).collect(Collectors.toList()).get(0).getDeptName());
List<Dept> deptData = deptList.stream().filter(item -> item.getDeptId().equals(configVO.getDeptId())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(deptData)) {
configVO.setDeptName(deptData.get(0).getDeptName());
}
deptConfigVOS.add(configVO);
}
return deptConfigVOS;
@@ -96,7 +98,6 @@ public class DeptMapServiceImpl implements DeptMapService {
} else {
throw new BusinessException(CommonResponseEnum.DEPT_BINDED);
}
}
@Override