Browse Source

增加取sku方法

master v0.6.1
guzeng 2 years ago
parent
commit
709392fb99
2 changed files with 67 additions and 0 deletions
  1. +57
    -0
      product.pb.go
  2. +10
    -0
      product.proto

+ 57
- 0
product.pb.go View File

@ -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) {


+ 10
- 0
product.proto View File

@ -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查询
}

Loading…
Cancel
Save