Commit b6b1bcbb by fudahua

图片内容

parent 97a0b188
......@@ -454,7 +454,7 @@ public class StaffApiServiceImpl implements StaffApiService {
Set<String> newDepartIds = departmentDTOList.stream().map(DepartmentDTO::getDepartmentId).collect(Collectors.toSet());
Set<String> hasDepartIds = hasRelationMap.keySet();
Sets.SetView<String> delDepartIds = Sets.difference(hasDepartIds, newDepartIds);
Sets.SetView<String> updateDepartIds = Sets.difference(newDepartIds,hasDepartIds );
Sets.SetView<String> updateDepartIds = Sets.intersection(newDepartIds,hasDepartIds );//交集
logger.info("删除部门:{}",JSONObject.toJSONString(delDepartIds));
if (!delDepartIds.isEmpty()) {
delDepartIds.forEach(delDepartId->{
......
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