feat: ad manager

This commit is contained in:
zzw
2026-08-21 17:38:39 +08:00
parent f05656580c
commit caafc455bb
34 changed files with 454 additions and 300 deletions
+19 -4
View File
@@ -5,34 +5,36 @@ option go_package = "lone-services/rpc/ad";
import "google/api/annotations.proto";
service Ad {
// 添加广告
rpc Create(CreateReq) returns (Response) {
option (google.api.http) = {
post: "/admin/v3/ad"
body: "*"
};
}
// 编辑广告
rpc Edit(EditReq) returns (Response) {
option (google.api.http) = {
put: "/admin/v3/ad"
body: "*"
};
}
// 广告列表
rpc Items(ItemsReq) returns (Response) {
option (google.api.http) = {
get: "/admin/v3/ad"
body: "*"
};
}
// 广告状态
rpc Status(StatusReq) returns (Response) {
option (google.api.http) = {
put: "/admin/v3/ad/status"
body: "*"
};
}
rpc WebItems(WebItemsReq) returns (Response) {
option (google.api.http) = {
get: "/api/v3/ad"
body: "*"
};
}
}
message Response {
@@ -61,6 +63,11 @@ message ItemsReq {
uint32 page_size = 2;
}
// type: 逗号分隔,如 "1,2,3"
message WebItemsReq {
string type = 1;
}
message StatusReq {
int64 id = 1;
uint32 status = 2;
@@ -83,3 +90,11 @@ message Item {
string update_time = 8;
string create_time = 9;
}
message WebItem {
int64 id = 1;
uint32 type = 2;
string image = 3;
string content = 4;
string url = 5;
}