|
@@ -117,6 +117,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
private IInnerService innerService;
|
|
|
@Autowired
|
|
|
LaserService laserService;
|
|
|
+ @Autowired
|
|
|
+ ISceneDelLogService sceneDelLogService;
|
|
|
|
|
|
@Value("${scene.pro.url}")
|
|
|
private String sceneProUrl;
|
|
@@ -450,7 +452,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteByIds(List<Long> sceneIds) {
|
|
|
+ public void deleteByIds(List<Long> sceneIds,Long userId) {
|
|
|
if(sceneIds.size() >0){
|
|
|
LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.in(ScenePro::getId,sceneIds)
|
|
@@ -461,7 +463,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
plusWr.in(ScenePlus::getId,sceneIds);
|
|
|
List<ScenePlus> plusList = scenePlusService.list(plusWr);
|
|
|
|
|
|
- this.deleteByList(proList,plusList);
|
|
|
+ this.deleteByList(proList,plusList,userId);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -941,7 +943,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void delete(String sceneNum) {
|
|
|
+ public void delete(String sceneNum,Long userId) {
|
|
|
if(StringUtils.isEmpty(sceneNum)){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3001,LoginConstant.FAILURE_MSG_3001);
|
|
|
}
|
|
@@ -949,15 +951,16 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
List<String> numList = Arrays.asList(nums);
|
|
|
List<ScenePro> proList = this.getListByNums(numList);
|
|
|
List<ScenePlus> plusList = scenePlusService.getListByNums(numList);
|
|
|
- this.deleteByList(proList,plusList);
|
|
|
+ this.deleteByList(proList,plusList,userId);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteByList(List<ScenePro> proList,List<ScenePlus> plusList) {
|
|
|
+ public void deleteByList(List<ScenePro> proList,List<ScenePlus> plusList,Long userId) {
|
|
|
HashMap<Long ,Long >cameraMap = new HashMap<>();
|
|
|
if(proList.size() >0){
|
|
|
for (ScenePro scenePro : proList) {
|
|
|
cameraMap.merge(scenePro.getCameraId(), scenePro.getSpace(), Long::sum);
|
|
|
+ sceneDelLogService.saveLog(scenePro.getNum(),userId);
|
|
|
}
|
|
|
List<Long> proIds = proList.parallelStream().map(ScenePro::getId).collect(Collectors.toList());
|
|
|
this.removeByIds(proIds);
|
|
@@ -971,6 +974,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
if(scenePlus.getCameraId()!= null && plusMap.get(scenePlus.getId())!=null){
|
|
|
cameraMap.merge(scenePlus.getCameraId(), plusMap.get(scenePlus.getId()).getSpace(), Long::sum);
|
|
|
}
|
|
|
+ sceneDelLogService.saveLog(scenePlus.getNum(),userId);
|
|
|
}
|
|
|
scenePlusService.removeByIds(plusIds);
|
|
|
scenePlusExtService.removeByPlusIds(plusIds);
|