实现category service基础接口

This commit is contained in:
2025-05-31 16:27:01 +08:00
parent faa6a35475
commit e5446bf836
33 changed files with 1420 additions and 67 deletions

View File

@ -28,6 +28,9 @@ service Category {
// 查询过滤
rpc ListCategories(ListCategoryRequest) returns (CategoryListResponse);
rpc CheckAlias(CheckAliasRequest) returns (CheckAliasResponse);
// 根据系统ID获取分类
rpc GetSystemCategories(GetSystemCategoriesRequest) returns (GetSystemCategoriesResponse);
}
// 健康检查请求
@ -175,4 +178,19 @@ message CheckAliasRequest {
message CheckAliasResponse {
bool is_available = 1;
string existing_id = 2; // 冲突时返回已存在的分类ID
}
message GetSystemCategoriesRequest {
string system_id = 1; // 系统标识 (必需)
string parent_id = 2; // 父分类ID (可选)
int32 page = 3; // 分页参数
int32 page_size = 4; // 分页参数
bool include_descendants = 5; // 是否包含后代
}
message GetSystemCategoriesResponse {
repeated CategoryInfo categories = 1;
int64 total = 2;
int32 current_page = 3;
int32 page_size = 4;
}