|
@@ -86,16 +86,19 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
List<String> numList = sceneProList.stream().map(ScenePro::getNum).collect(Collectors.toList());
|
|
|
List<String> numList2 = scenePlusList.stream().map(ScenePlus::getNum).collect(Collectors.toList());
|
|
|
numList.addAll(numList2);
|
|
|
- this.deleteCooperationList(numList,userIds);
|
|
|
+ this.deleteCooperationList(numList,userIds,null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteCooperationList(List<String> numList,List<Long> userIds) {
|
|
|
+ public void deleteCooperationList(List<String> numList,List<Long> userIds,String sceneType) {
|
|
|
if(CollectionUtils.isEmpty(numList) ){
|
|
|
return;
|
|
|
}
|
|
|
LambdaQueryWrapper<SceneCooperation> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.in(SceneCooperation::getSceneNum,numList);
|
|
|
+ if(sceneType != null){
|
|
|
+ wrapper.eq(SceneCooperation::getSceneType,sceneType);
|
|
|
+ }
|
|
|
if(userIds != null && !userIds.isEmpty()){
|
|
|
wrapper.in(SceneCooperation::getUserId,userIds);
|
|
|
}
|
|
@@ -287,13 +290,16 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
List<String> numList = Arrays.asList(nums);
|
|
|
|
|
|
if(param.getUserNameList() == null || param.getUserNameList().isEmpty()){
|
|
|
- this.deleteCooperationList(numList,null);
|
|
|
+ this.deleteCooperationList(numList,null,param.getSceneType());
|
|
|
laserService.saveBatchCooperation(numList,new ArrayList<>(),param.getUserNameList(),"scene","update");
|
|
|
return null;
|
|
|
}
|
|
|
if(param.getUserNameList().contains( loginUserName)){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3024, LoginConstant.FAILURE_MSG_3024);
|
|
|
}
|
|
|
+ if(param.getUserNameList().size() != new HashSet<>(param.getUserNameList()).size()){
|
|
|
+ throw new BusinessException(ResultCode.COO_LIMIT_ERROR2);
|
|
|
+ }
|
|
|
if(param.getUserNameList().size() >5){
|
|
|
throw new BusinessException(ResultCode.COO_LIMIT_ERROR);
|
|
|
}
|