|
@@ -42,6 +42,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
|
+import java.io.IOException;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -49,6 +50,7 @@ import java.util.Objects;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@Service
|
|
@Service
|
|
@@ -69,6 +71,8 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
|
|
|
@Value("#{'${camType.laser:}'.split(',')}")
|
|
@Value("#{'${camType.laser:}'.split(',')}")
|
|
private List<Integer> laserCamTypeList;
|
|
private List<Integer> laserCamTypeList;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISceneAsynOperLogService sceneAsynOperLogService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
@@ -516,4 +520,25 @@ public class CommonServiceImpl implements ICommonService {
|
|
rabbitMqProducer.sendByWorkQueue(config.getQueueName(), content);
|
|
rabbitMqProducer.sendByWorkQueue(config.getQueueName(), content);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void removeSceneAsynOperLog(String num) {
|
|
|
|
+ List<SceneAsynOperLog> list = sceneAsynOperLogService.list(new LambdaQueryWrapper<SceneAsynOperLog>().eq(SceneAsynOperLog::getNum, num));
|
|
|
|
+ if(CollUtil.isEmpty(list)){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //删除数据库记录
|
|
|
|
+ List<Long> deleteIdList = list.parallelStream().map(item -> item.getId()).collect(Collectors.toList());
|
|
|
|
+ sceneAsynOperLogService.removeByIds(deleteIdList);
|
|
|
|
+
|
|
|
|
+ list.parallelStream().forEach(item -> {
|
|
|
|
+ if(StrUtil.isNotEmpty(item.getUrl())){
|
|
|
|
+ try {
|
|
|
|
+ fYunFileServiceInterface.deleteFile(item.getUrl());
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ log.warn("删除oss全景图下载压缩包失败,key:{}", item.getUrl());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|