mirror of
https://github.com/vran-dev/databasir.git
synced 2025-08-23 04:19:07 +08:00
feat: add batch query table api
This commit is contained in:
@@ -24,6 +24,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.springframework.data.domain.Sort.Direction.DESC;
|
||||
@@ -86,10 +87,11 @@ public class DocumentController {
|
||||
return JsonData.ok(documentService.getSimpleOneByProjectId(projectId, version));
|
||||
}
|
||||
|
||||
@GetMapping(Routes.Document.GET_TABLE_DETAIL)
|
||||
public JsonData<DatabaseDocumentResponse.TableDocumentResponse> getTableDocument(@PathVariable Integer projectId,
|
||||
@PathVariable Integer tableId) {
|
||||
return JsonData.ok(documentService.getTableDetails(projectId, tableId));
|
||||
@PostMapping(Routes.Document.GET_TABLE_DETAIL)
|
||||
public JsonData<List<DatabaseDocumentResponse.TableDocumentResponse>> getTableDocument(@PathVariable Integer projectId,
|
||||
@PathVariable Integer documentId,
|
||||
@RequestBody List<Integer> tableIds) {
|
||||
return JsonData.ok(documentService.getTableDetails(projectId, documentId, tableIds));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -80,7 +80,7 @@ public interface Routes {
|
||||
|
||||
String GET_SIMPLE_ONE = BASE + "/projects/{projectId}/documents/simple";
|
||||
|
||||
String GET_TABLE_DETAIL = BASE + "/projects/{projectId}/table_documents/{tableId}";
|
||||
String GET_TABLE_DETAIL = BASE + "/projects/{projectId}/documents/{documentId}/table_documents";
|
||||
|
||||
String EXPORT = BASE + "/projects/{projectId}/document_files";
|
||||
}
|
||||
|
Reference in New Issue
Block a user