新增文件导出功能
This commit is contained in:
parent
edec6d424d
commit
f80739091c
|
@ -45,7 +45,52 @@ service resource {
|
||||||
// 设置示例logo
|
// 设置示例logo
|
||||||
rpc SetExampleLogo(SetExampleLogoReq) returns (SetExampleLogoRes) {}
|
rpc SetExampleLogo(SetExampleLogoReq) returns (SetExampleLogoRes) {}
|
||||||
|
|
||||||
|
// 导出文件--CSV
|
||||||
|
rpc ExportCsv(ExportCsvReq) returns (ExportCsvRes) {}
|
||||||
|
|
||||||
|
// 导出文件--Excel
|
||||||
|
rpc ExportExcel(ExportExcelReq) returns (ExportExcelRes) {}
|
||||||
|
|
||||||
|
// 导出文件--zip
|
||||||
|
rpc ExportZip(ExportZipReq) returns (ExportZipRes) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
message ExportData {
|
||||||
|
repeated string child = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportFile {
|
||||||
|
string file_type = 1;// 文件类型
|
||||||
|
string file_name = 2;// 文件名称
|
||||||
|
bytes file_bytes = 3;// 文件流
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportCsvReq {
|
||||||
|
repeated ExportData file_data = 1; // 文件数据
|
||||||
|
string file_name = 2;// 文件名称
|
||||||
|
int64 total = 3; // 数据量
|
||||||
|
}
|
||||||
|
message ExportCsvRes {
|
||||||
|
string export_file_path = 1; // 下载链接
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportExcelReq {
|
||||||
|
repeated ExportData file_data = 1; // 文件数据
|
||||||
|
string file_name = 2;// 文件名称
|
||||||
|
}
|
||||||
|
message ExportExcelRes {
|
||||||
|
string export_file_path = 1; // 下载链接
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExportZipReq {
|
||||||
|
repeated ExportFile file_data = 1; // 文件数据
|
||||||
|
string file_name = 2;// 文件名称
|
||||||
|
}
|
||||||
|
message ExportZipRes {
|
||||||
|
string export_file_path = 1; // 下载链接
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 设置示例logo */
|
/* 设置示例logo */
|
||||||
message SetExampleLogoReq {
|
message SetExampleLogoReq {
|
||||||
int64 is_example = 1;
|
int64 is_example = 1;
|
||||||
|
@ -304,4 +349,5 @@ message ResourceIds {
|
||||||
repeated string resource_ids = 1;
|
repeated string resource_ids = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 获取资源详情 */
|
/* 获取资源详情 */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user