| | |
| | | return ResponseEntity.ok(result); |
| | | } |
| | | |
| | | // 新增:修改目录显示状态 |
| | | @ApiOperation("修改目录是否可见") |
| | | @PutMapping("/dirvisible/{id}/{isTrue}") |
| | | public ResponseEntity<Map<String, Object>> updateDirectoryVisible(@PathVariable String id, @PathVariable Integer isTrue) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try{ |
| | | boolean success = directoryService.updateDirectoryVisible(id, isTrue); |
| | | result.put("success", success); |
| | | result.put("msg", success ? "修改目录是否可见成功" : "修改目录是否可见失败"); |
| | | } |
| | | catch (Exception e) { |
| | | log.error("修改目录是否可见异常", e); |
| | | result.put("success", false); |
| | | result.put("msg", "修改目录是否可见失败:" + e.getMessage()); |
| | | } |
| | | return ResponseEntity.ok(result); |
| | | } |
| | | |
| | | @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); |
| | |
| | | return ResponseEntity.ok(result); |
| | | } |
| | | |
| | | // 新增:修改标注显示状态 |
| | | @ApiOperation("修改标记是否可见") |
| | | @PutMapping("/annvisible/{id}/{isTrue}") |
| | | public ResponseEntity<Map<String, Object>> updateAnnotationVisible(@PathVariable String id, @PathVariable Integer isTrue) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try{ |
| | | boolean success = annotationService.updateAnnotationVisible(id, isTrue); |
| | | result.put("success", success); |
| | | result.put("msg", success ? "修改标记是否可见成功" : "修改标记是否可见失败"); |
| | | } |
| | | catch (Exception e) { |
| | | log.error("修改标记是否可见异常", e); |
| | | result.put("success", false); |
| | | result.put("msg", "修改标记是否可见失败:" + e.getMessage()); |
| | | } |
| | | //boolean result = annotationService.updateAnnotationVisible(id, isTrue); |
| | | return ResponseEntity.ok(result); |
| | | } |
| | | |
| | | @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); |