修改VDR问题

This commit is contained in:
高嵩
2023-09-19 17:48:47 +08:00
parent 8aaf1e90b3
commit 0e1eaf78dd
@@ -1506,16 +1506,21 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
}
}
}
List<OtaManagePermission> ompAllList = otaManagePermissionService.list();
List<OtaManagePermission> ompList = new ArrayList<>();
for (String studioId : matchStudioMap.keySet()) {
OtaManagePermission omp = new OtaManagePermission();
omp.setApplyId(id);
omp.setUserId(studioId);
omp.setVehicle(matchStudioMap.get(studioId).stream().collect(Collectors.joining(",")));
ompList.add(omp);
List<OtaManagePermission> filterList = ompAllList.stream().filter(o->o.getApplyId().equals(id)&&o.getUserId().equals(studioId)).collect(Collectors.toList());
if(CollectionUtils.isEmpty(filterList)){
OtaManagePermission omp = new OtaManagePermission();
omp.setApplyId(id);
omp.setUserId(studioId);
omp.setVehicle(matchStudioMap.get(studioId).stream().collect(Collectors.joining(",")));
ompList.add(omp);
}
}
if(CollectionUtils.isNotEmpty(ompList)){
otaManagePermissionService.saveBatch(ompList);
}
otaManagePermissionService.saveBatch(ompList);
//给studio发消息
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Map<String, Object> params = new HashMap<>();