李哲 vor 4 Jahren
Ursprung
Commit
7832af5bc9
3 geänderte Dateien mit 12 neuen und 12 gelöschten Zeilen
  1. 1 1
      rpc/activity.proto
  2. 5 5
      rpc/activity/activity.pb.go
  3. 6 6
      rpc/activityclient/activity.go

+ 1 - 1
rpc/activity.proto

@@ -78,7 +78,7 @@ message ProductJson{
 message LotteryResp {
   int64     code =1;            //响应代码
   string    message=2;          //响应消息
-  repeated  LotteryJson data=3; //奖券信息
+  LotteryJson data=3; //奖券信息
 }
 service Activity {
   //查询活动下的奖券

+ 5 - 5
rpc/activity/activity.pb.go

@@ -772,9 +772,9 @@ type LotteryResp struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Code    int64          `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`      //响应代码
-	Message string         `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //响应消息
-	Data    []*LotteryJson `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`       //奖券信息
+	Code    int64        `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`      //响应代码
+	Message string       `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //响应消息
+	Data    *LotteryJson `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`       //奖券信息
 }
 
 func (x *LotteryResp) Reset() {
@@ -823,7 +823,7 @@ func (x *LotteryResp) GetMessage() string {
 	return ""
 }
 
-func (x *LotteryResp) GetData() []*LotteryJson {
+func (x *LotteryResp) GetData() *LotteryJson {
 	if x != nil {
 		return x.Data
 	}
@@ -951,7 +951,7 @@ var file_activity_proto_rawDesc = []byte{
 	0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18,
 	0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
-	0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
 	0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x52, 0x04, 0x64,
 	0x61, 0x74, 0x61, 0x32, 0x8e, 0x03, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
 	0x12, 0x43, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x6f, 0x74, 0x74,

+ 6 - 6
rpc/activityclient/activity.go

@@ -14,15 +14,15 @@ import (
 )
 
 type (
-	ProductJson         = activity.ProductJson
-	LotteryResp         = activity.LotteryResp
-	Request             = activity.Request
-	Response            = activity.Response
-	LotteryJson         = activity.LotteryJson
-	ActivityJson        = activity.ActivityJson
 	LotteryOperation    = activity.LotteryOperation
 	UpdateStateReq      = activity.UpdateStateReq
+	Response            = activity.Response
+	Request             = activity.Request
 	ActivityLotteryResp = activity.ActivityLotteryResp
+	LotteryJson         = activity.LotteryJson
+	ActivityJson        = activity.ActivityJson
+	ProductJson         = activity.ProductJson
+	LotteryResp         = activity.LotteryResp
 
 	Activity interface {
 		// 查询活动下的奖券