cc23c30c9e
CI / changes (push) Successful in 1m34s
CI / ad (push) Successful in 27s
CI / admin (push) Successful in 17s
CI / aiserver (push) Successful in 26s
CI / analysis (push) Successful in 22s
CI / bff (push) Successful in 21s
CI / chore (push) Successful in 20s
CI / equipment (push) Successful in 19s
CI / express (push) Successful in 19s
CI / factory (push) Successful in 19s
CI / message (push) Successful in 18s
CI / order (push) Successful in 19s
CI / payment (push) Successful in 17s
CI / percutaneous (push) Successful in 17s
CI / product (push) Successful in 19s
CI / record (push) Successful in 19s
CI / sale (push) Successful in 19s
CI / store (push) Successful in 20s
CI / support (push) Successful in 19s
CI / task (push) Successful in 21s
CI / user (push) Successful in 22s
CI / water (push) Successful in 25s
CI / wecom (push) Successful in 21s
CI / ws (push) Successful in 9s
148 lines
3.4 KiB
Protocol Buffer
148 lines
3.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package aiserver;
|
|
option go_package="./aiserver";
|
|
import "google/api/annotations.proto";
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message ApiAddProductRequest {
|
|
string product_code = 1;
|
|
string product_serial_number = 2;
|
|
}
|
|
|
|
message ApiAddUseRequest {
|
|
string product_serial_number = 1;
|
|
int32 mg = 2;
|
|
int64 id = 3;
|
|
}
|
|
|
|
message ApiProductItemsRequest {
|
|
repeated string product_code = 1;
|
|
}
|
|
|
|
message ApiEditPlanningRequest {
|
|
string name = 1;
|
|
string begin_time = 2;
|
|
int64 id = 3;
|
|
string end_time = 4;
|
|
}
|
|
|
|
message ApiEditPlanningProductRequest {
|
|
string product_code = 1;
|
|
int32 use_mg = 2;
|
|
int64 planning_id = 3;
|
|
}
|
|
|
|
message ApiPlanningDeleteRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message EmptyRequest {
|
|
|
|
}
|
|
|
|
message ApiUsedItemsRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
repeated string time = 3;
|
|
}
|
|
|
|
message ApiSystemSetRequest {
|
|
int32 lang = 1; //语言
|
|
int32 wifi = 2; //wifi
|
|
int32 screen = 3; //屏幕亮度
|
|
int32 sound = 4; //声音
|
|
int32 light_open = 5; //是否开灯
|
|
string light_work_time = 6; //灯工作时间
|
|
int32 light_brightness = 7; //灯亮度
|
|
int32 screen_sleep_time = 8; //屏幕休眠时间
|
|
|
|
}
|
|
|
|
service Aiserver {
|
|
// 添加产品
|
|
rpc ApiAddProduct(ApiAddProductRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/add/product"
|
|
};
|
|
};
|
|
// 添加使用记录
|
|
rpc ApiAddUse(ApiAddUseRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/add/use"
|
|
};
|
|
};
|
|
// 获取产品信息
|
|
rpc ApiProductItems(ApiProductItemsRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/product/items"
|
|
};
|
|
};
|
|
// 添加方案
|
|
rpc ApiAddPlanning(ApiEditPlanningRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/add/planning"
|
|
};
|
|
};
|
|
// 编辑方案产品
|
|
rpc ApiEditPlanningProduct(ApiEditPlanningProductRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/add/planning"
|
|
};
|
|
};
|
|
// 编辑方案
|
|
rpc ApiEditPlanning(ApiEditPlanningRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/edit/planning"
|
|
};
|
|
};
|
|
// 方案列表
|
|
rpc ApiPlanningItems(EmptyRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/planning/items"
|
|
};
|
|
};
|
|
|
|
// 方案删除
|
|
rpc ApiPlanningDelete(ApiPlanningDeleteRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/planning/delete"
|
|
};
|
|
};
|
|
// 获取天气
|
|
rpc ApiWeather(EmptyRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/weather"
|
|
};
|
|
};
|
|
// 获取使用记录
|
|
rpc ApiUsedItems(ApiUsedItemsRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/used/items"
|
|
};
|
|
};
|
|
// 获取系统时间
|
|
rpc ApiSystemTime(EmptyRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/system/time"
|
|
};
|
|
};
|
|
// 设置系统参数
|
|
rpc ApiSystemSet(ApiSystemSetRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/system/set"
|
|
};
|
|
};
|
|
// 获取系统设置
|
|
rpc ApiGetSystem(EmptyRequest) returns(Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/aiserver/get/system"
|
|
};
|
|
};
|
|
}
|