diff --git a/product.pb.go b/product.pb.go index 5ffe2c9..f52ff17 100644 --- a/product.pb.go +++ b/product.pb.go @@ -11,6 +11,7 @@ It is generated from these files: It has these top-level messages: GetRequest GetUuidRequest + GetSkuRequest GetResponse Request Response @@ -112,6 +113,54 @@ func (m *GetUuidRequest) GetField() string { return "" } +type GetSkuRequest struct { + SiteId *string `protobuf:"bytes,1,opt,name=site_id" json:"site_id,omitempty"` + Dbname *string `protobuf:"bytes,2,opt,name=dbname" json:"dbname,omitempty"` + ProductUuid *string `protobuf:"bytes,3,opt,name=product_uuid" json:"product_uuid,omitempty"` + SkuId *string `protobuf:"bytes,4,opt,name=sku_id" json:"sku_id,omitempty"` + Field *string `protobuf:"bytes,5,opt,name=field" json:"field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetSkuRequest) Reset() { *m = GetSkuRequest{} } +func (m *GetSkuRequest) String() string { return proto.CompactTextString(m) } +func (*GetSkuRequest) ProtoMessage() {} + +func (m *GetSkuRequest) GetSiteId() string { + if m != nil && m.SiteId != nil { + return *m.SiteId + } + return "" +} + +func (m *GetSkuRequest) GetDbname() string { + if m != nil && m.Dbname != nil { + return *m.Dbname + } + return "" +} + +func (m *GetSkuRequest) GetProductUuid() string { + if m != nil && m.ProductUuid != nil { + return *m.ProductUuid + } + return "" +} + +func (m *GetSkuRequest) GetSkuId() string { + if m != nil && m.SkuId != nil { + return *m.SkuId + } + return "" +} + +func (m *GetSkuRequest) GetField() string { + if m != nil && m.Field != nil { + return *m.Field + } + return "" +} + // 使用key查询响应结构 type GetResponse struct { Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` @@ -210,6 +259,8 @@ type ProductService interface { GetProductActivity(in *Request, out *Response) error GetProductAllActivity(in *Request, out *Response) error GetProductWarmingActivity(in *Request, out *Response) error + GetSkuInfo(in *GetSkuRequest, out *GetResponse) error + GetSkuList(in *GetSkuRequest, out *GetResponse) error } // AcceptProductServiceClient accepts connections on the listener and serves requests @@ -314,6 +365,12 @@ func (c *ProductServiceClient) GetProductAllActivity(in *Request, out *Response) func (c *ProductServiceClient) GetProductWarmingActivity(in *Request, out *Response) error { return c.Call("ProductService.GetProductWarmingActivity", in, out) } +func (c *ProductServiceClient) GetSkuInfo(in *GetSkuRequest, out *GetResponse) error { + return c.Call("ProductService.GetSkuInfo", in, out) +} +func (c *ProductServiceClient) GetSkuList(in *GetSkuRequest, out *GetResponse) error { + return c.Call("ProductService.GetSkuList", in, out) +} // DialProductService connects to an ProductService at the specified network address. func DialProductService(network, addr string) (*ProductServiceClient, *rpc.Client, error) { diff --git a/product.proto b/product.proto index 92c9e22..0de7d90 100644 --- a/product.proto +++ b/product.proto @@ -16,6 +16,14 @@ message GetUuidRequest { string field = 4; } +message GetSkuRequest { + string site_id = 1; + string dbname = 2; + string product_uuid = 3; + string sku_id = 4; + string field = 5; +} + // 使用key查询响应结构 message GetResponse { bytes value = 1; @@ -49,4 +57,6 @@ service ProductService { rpc GetProductActivity(Request) returns (Response); //查询商品所在的活动 rpc GetProductAllActivity(Request) returns (Response); //查询商品所在的所有活动 rpc GetProductWarmingActivity(Request) returns (Response); //查询商品所在的预热中活动 + rpc GetSkuInfo (GetSkuRequest) returns (GetResponse); // 使用uuid查询 + rpc GetSkuList (GetSkuRequest) returns (GetResponse); // 使用uuid查询 } \ No newline at end of file