WH01243 4 лет назад
Родитель
Сommit
3e0cc8232f

+ 1 - 0
api/internal/logic/activitylotterychecklogic.go

@@ -50,6 +50,7 @@ func (l *ActivityLotteryCheckLogic) ActivityLotteryCheck(req types.Request) (*ty
 			productJson.ProductName = value.ProductName
 			productJson.WxPage = value.WxPage
 			productJson.PcPage = value.PcPage
+			productJson.ProductCode=value.ProductCode
 			userLottery.UseProductList=append(userLottery.UseProductList,productJson)
 		}
 		//userLottery.UseProductList = value.UseProductList

+ 1 - 0
api/internal/logic/lotteryinfochecklogic.go

@@ -48,6 +48,7 @@ func (l *LotteryInfoCheckLogic) LotteryInfoCheck(req types.Request) (*types.Lott
 		productJson.ProductName = value.ProductName
 		productJson.WxPage = value.WxPage
 		productJson.PcPage = value.PcPage
+		productJson.ProductCode=value.ProductCode
 		userLottery.UseProductList=append(userLottery.UseProductList,productJson)
 	}
 	userLottery.Instructions = data.Instructions

+ 1 - 0
api/internal/logic/userlotterychecklogic.go

@@ -50,6 +50,7 @@ func (l *UserLotteryCheckLogic) UserLotteryCheck(req types.Request) (*types.Acti
 			productJson.ProductName = value.ProductName
 			productJson.WxPage = value.WxPage
 			productJson.PcPage = value.PcPage
+			productJson.ProductCode=value.ProductCode
 			userLottery.UseProductList=append(userLottery.UseProductList,productJson)
 		}
 		//userLottery.UseProductList = value.UseProductList

+ 1 - 0
api/internal/types/types.go

@@ -72,6 +72,7 @@ type ActivityJson struct {
 
 type ProductJson struct {
 	ProductName string `xorm:"productName" form:"productName" json:"productName"` //产品名称
+	ProductCode int64  `xorm:"productCode" form:"productCode" json:"productCode"` //产品编号
 	PcPage      string `xorm:"pcPage" form:"pcPage" json:"pcPage"`                //pc端产品推广页地址
 	WxPage      string `xorm:"wxPage" form:"wxPage" json:"wxPage"`                //wx端产品推广页地址
 	AppPage     string `xorm:"appPage" form:"appPage" json:"appPage"`             //app端产品推广页地址

+ 1 - 0
entity/activity.go

@@ -119,4 +119,5 @@ type ProductJson struct {
 	WxPage      string `xorm:"wxPage" form:"wxPage" json:"wxPage"`                //wx端产品推广页地址
 	AppPage     string `xorm:"appPage" form:"appPage" json:"appPage"`             //app端产品推广页地址
 	Describe    string `xorm:"describe" form:"describe" json:"describe"`          //描述
+	ProductCode int64 `xorm:"productCode" form:"productCode" json:"productCode"` //产品编号
 }

+ 1 - 0
rpc/activity.proto

@@ -73,6 +73,7 @@ message ProductJson{
       string  wxPage=3;//wx端产品推广页地址
       string  appPage=4;//app端产品推广页地址
       string  describe=5;//描述
+      int64   productCode=6;//产品编号
 }
 //活动下的奖券信息
 message LotteryResp {

+ 49 - 39
rpc/activity/activity.pb.go

@@ -692,11 +692,12 @@ type ProductJson struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	ProductName string `protobuf:"bytes,1,opt,name=productName,proto3" json:"productName,omitempty"` //产品名称
-	PcPage      string `protobuf:"bytes,2,opt,name=pcPage,proto3" json:"pcPage,omitempty"`           //pc端产品推广页地址
-	WxPage      string `protobuf:"bytes,3,opt,name=wxPage,proto3" json:"wxPage,omitempty"`           //wx端产品推广页地址
-	AppPage     string `protobuf:"bytes,4,opt,name=appPage,proto3" json:"appPage,omitempty"`         //app端产品推广页地址
-	Describe    string `protobuf:"bytes,5,opt,name=describe,proto3" json:"describe,omitempty"`       //描述
+	ProductName string `protobuf:"bytes,1,opt,name=productName,proto3" json:"productName,omitempty"`  //产品名称
+	PcPage      string `protobuf:"bytes,2,opt,name=pcPage,proto3" json:"pcPage,omitempty"`            //pc端产品推广页地址
+	WxPage      string `protobuf:"bytes,3,opt,name=wxPage,proto3" json:"wxPage,omitempty"`            //wx端产品推广页地址
+	AppPage     string `protobuf:"bytes,4,opt,name=appPage,proto3" json:"appPage,omitempty"`          //app端产品推广页地址
+	Describe    string `protobuf:"bytes,5,opt,name=describe,proto3" json:"describe,omitempty"`        //描述
+	ProductCode int64  `protobuf:"varint,6,opt,name=productCode,proto3" json:"productCode,omitempty"` //产品编号
 }
 
 func (x *ProductJson) Reset() {
@@ -766,6 +767,13 @@ func (x *ProductJson) GetDescribe() string {
 	return ""
 }
 
+func (x *ProductJson) GetProductCode() int64 {
+	if x != nil {
+		return x.ProductCode
+	}
+	return 0
+}
+
 //活动下的奖券信息
 type LotteryResp struct {
 	state         protoimpl.MessageState
@@ -937,7 +945,7 @@ var file_activity_proto_rawDesc = []byte{
 	0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12,
 	0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x65, 0x73, 0x63, 0x18,
 	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44,
-	0x65, 0x73, 0x63, 0x22, 0x95, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4a,
+	0x65, 0x73, 0x63, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4a,
 	0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61,
 	0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
 	0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x63, 0x50, 0x61, 0x67, 0x65, 0x18,
@@ -946,39 +954,41 @@ var file_activity_proto_rawDesc = []byte{
 	0x78, 0x50, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x50, 0x61, 0x67, 0x65,
 	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x50, 0x61, 0x67, 0x65, 0x12,
 	0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x22, 0x66, 0x0a, 0x0b, 0x4c,
-	0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
-	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, 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,
-	0x65, 0x72, 0x79, 0x12, 0x11, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52,
-	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
-	0x79, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72,
-	0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0e, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79,
-	0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
-	0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
-	0x69, 0x6f, 0x6e, 0x1a, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x12, 0x6c, 0x6f, 0x74, 0x74, 0x65,
-	0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x2e,
-	0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
-	0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
-	0x74, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x61,
-	0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x55, 0x73, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x63, 0x74,
-	0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65,
-	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
-	0x79, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x75, 0x73,
-	0x65, 0x72, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x12, 0x11, 0x2e, 0x61, 0x63, 0x74, 0x69,
-	0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61,
-	0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
-	0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x6c,
-	0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x11, 0x2e, 0x61, 0x63, 0x74,
-	0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
-	0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79,
-	0x52, 0x65, 0x73, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70,
+	0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x66, 0x0a,
+	0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04,
+	0x63, 0x6f, 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, 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, 0x65, 0x72, 0x79, 0x12, 0x11, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
+	0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76,
+	0x69, 0x74, 0x79, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x6f, 0x74, 0x74,
+	0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0e, 0x6c, 0x6f, 0x74, 0x74, 0x65,
+	0x72, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x63, 0x74, 0x69,
+	0x76, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
+	0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x12, 0x6c, 0x6f, 0x74,
+	0x74, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12,
+	0x18, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
+	0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69,
+	0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a,
+	0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x55, 0x73, 0x65, 0x12, 0x1a, 0x2e, 0x61,
+	0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4f,
+	0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76,
+	0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0b,
+	0x75, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x12, 0x11, 0x2e, 0x61, 0x63,
+	0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
+	0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
+	0x74, 0x79, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a,
+	0x0b, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x11, 0x2e, 0x61,
+	0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x15, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x74, 0x74, 0x65,
+	0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 3 - 3
rpc/activityclient/activity.go

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

+ 1 - 0
rpc/internal/logic/activitylotterylogic.go

@@ -43,6 +43,7 @@ func (l *ActivityLotteryLogic) ActivityLottery(in *activity.Request) (*activity.
 			productJson.ProductName = value.ProductName
 			productJson.WxPage = value.WxPage
 			productJson.PcPage = value.PcPage
+			productJson.ProductCode=value.ProductCode
 			userLottery.UseProductList=append(userLottery.UseProductList,&productJson)
 		}
 		userLottery.Instructions=value.Instructions

+ 1 - 0
rpc/internal/logic/lotteryinfologic.go

@@ -40,6 +40,7 @@ func (l *LotteryInfoLogic) LotteryInfo(in *activity.Request) (*activity.LotteryR
 		productJson.ProductName = value.ProductName
 		productJson.WxPage = value.WxPage
 		productJson.PcPage = value.PcPage
+		productJson.ProductCode=value.ProductCode
 		userLottery.UseProductList=append(userLottery.UseProductList,&productJson)
 	}
 	userLottery.UserLotteryId = data.Id

+ 1 - 0
rpc/internal/logic/userlotterylogic.go

@@ -43,6 +43,7 @@ func (l *UserLotteryLogic) UserLottery(in *activity.Request) (*activity.Activity
 			productJson.ProductName = value.ProductName
 			productJson.WxPage = value.WxPage
 			productJson.PcPage = value.PcPage
+			productJson.ProductCode=value.ProductCode
 			userLottery.UseProductList=append(userLottery.UseProductList,&productJson)
 		}
 		userLottery.UserLotteryId=value.Id

+ 1 - 1
service/ActivityService.go

@@ -444,7 +444,7 @@ func (service *ActivityService)LotteryProduct(data *activity.Request) (int64, st
 	return entity.SuccessCode, "查询奖券对应的产品信息成功", productList
 }
 //奖券的基本信息
-func (service *ActivityService)LotteryInfo (data *activity.Request) (int64, string, entity.UserPrizeJson) {
+func (service *ActivityService)LotteryInfo(data *activity.Request) (int64, string, entity.UserPrizeJson) {
 	orm := entity.Engine.NewSession()
 	userLettryList := []entity.UserPrizeJson{}
 	//已用的奖券