|
@@ -237,13 +237,27 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
List<ScenePlus> plusList = scenePlusService.getListByNums(numList);
|
|
|
this.deleteCooperationList(proList,plusList);
|
|
|
|
|
|
+ List<SceneResource> v3List = new ArrayList<>();
|
|
|
+ List<SceneResource> v4List = new ArrayList<>();
|
|
|
List<Long> resourceIdList = new ArrayList<>();
|
|
|
if (StringUtils.isNotEmpty(param.getResourceIds())) {
|
|
|
for (String rId : param.getResourceIds().split(",")) {
|
|
|
resourceIdList.add(Long.valueOf(rId));
|
|
|
}
|
|
|
+ List<SceneResource> sceneResources = sceneResourceService.listByIds(resourceIdList);
|
|
|
+ v3List = sceneResources.stream().filter(entity -> entity.getVersion().equals("v3")).collect(Collectors.toList());
|
|
|
+ v4List = sceneResources.stream().filter(entity -> entity.getVersion().equals("v4")).collect(Collectors.toList());
|
|
|
}
|
|
|
- this.saveBatchByList(proList,plusList,user.getId(),resourceIdList);
|
|
|
+
|
|
|
+ if(!v3List.isEmpty() && !proList.isEmpty()){
|
|
|
+ List<Long> v3Ids = v3List.stream().map(SceneResource::getId).collect(Collectors.toList());
|
|
|
+ this.saveBatchByList(proList,new ArrayList<>(),user.getId(),v3Ids);
|
|
|
+ }
|
|
|
+ if(!v4List.isEmpty() && !plusList.isEmpty()){
|
|
|
+ List<Long> v4Ids = v4List.stream().map(SceneResource::getId).collect(Collectors.toList());
|
|
|
+ this.saveBatchByList(new ArrayList<>(),plusList,user.getId(),v4Ids);
|
|
|
+ }
|
|
|
+
|
|
|
if("aws".equals(NacosProperty.uploadType)){
|
|
|
mailTemplateService.sendSceneCooperation(proList,plusList,param.getUserName(),param.getLang());
|
|
|
}
|