2026-03-09 标记功能接口调整:
1、ID改为UUID;
2、点、线、面、圆数据增加索引字段sort,以标注各点的顺序;
3、增加is_true字段,用于标记是否在地图上可见;
| | |
| | | |
| | | @ApiOperation("删除目录及子项") |
| | | @DeleteMapping("/directory/{id}") |
| | | public ResponseEntity<Map<String, Object>> deleteDirectory(@PathVariable Integer id) { |
| | | public ResponseEntity<Map<String, Object>> deleteDirectory(@PathVariable String id) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | boolean success = directoryService.deleteDirectory(id); |
| | |
| | | |
| | | @ApiOperation("删除标记") |
| | | @DeleteMapping("/{id}") |
| | | public ResponseEntity<Map<String, Object>> deleteAnnotation(@PathVariable Integer id) { |
| | | public ResponseEntity<Map<String, Object>> deleteAnnotation(@PathVariable String id) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | boolean success = annotationService.deleteAnnotation(id); |
| | |
| | | boolean updateDirectoryVisible(String id, Integer isTrue); |
| | | |
| | | // 删除目录(级联删除标记) |
| | | boolean deleteDirectory(Integer id); |
| | | boolean deleteDirectory(String id); |
| | | |
| | | // 新增:查询全部目录(含下属标注数据) |
| | | List<AnnotationDirectoryDTO> listAllDirectoryWithAnnotations(); |
| | |
| | | // 修改标记可见性 |
| | | boolean updateAnnotationVisible(String id, Integer isTrue); |
| | | // 删除标记 |
| | | boolean deleteAnnotation(Integer id); |
| | | boolean deleteAnnotation(String id); |
| | | // 批量删除标记 |
| | | boolean batchDeleteAnnotation(List<Integer> ids); |
| | | boolean batchDeleteAnnotation(List<String> ids); |
| | | // 按目录ID查询标记 |
| | | List<AnnotationEntity> listByDirectoryId(Integer directoryId); |
| | | List<AnnotationEntity> listByDirectoryId(String directoryId); |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) // 事务保证级联删除 |
| | | public boolean deleteDirectory(Integer id) { |
| | | public boolean deleteDirectory(String id) { |
| | | if (id == null) { |
| | | log.error("删除目录失败:ID为空"); |
| | | return false; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteAnnotation(Integer id) { |
| | | public boolean deleteAnnotation(String id) { |
| | | if (id == null) { |
| | | log.error("删除标记失败:ID为空"); |
| | | return false; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean batchDeleteAnnotation(List<Integer> ids) { |
| | | public boolean batchDeleteAnnotation(List<String> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | log.error("批量删除标记失败:ID列表为空"); |
| | | return false; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AnnotationEntity> listByDirectoryId(Integer directoryId) { |
| | | public List<AnnotationEntity> listByDirectoryId(String directoryId) { |
| | | if (directoryId == null) { |
| | | log.error("按目录查询标记失败:目录ID为空"); |
| | | return List.of(); |