检验是否生成订单代码上传

This commit is contained in:
songchuang 2025-03-28 16:48:23 +08:00
parent b1399934bf
commit a0ec3c4a7a
3 changed files with 90 additions and 23 deletions

View File

@ -704,7 +704,7 @@ type OrderRecordsRequest struct {
StartPayTime string `protobuf:"bytes,11,opt,name=startPayTime,proto3" json:"startPayTime"`
EndPayTime string `protobuf:"bytes,12,opt,name=endPayTime,proto3" json:"endPayTime"`
CustomerID string `protobuf:"bytes,13,opt,name=customerID,proto3" json:"customerID"`
IsHaveValueAdd int64 `protobuf:"varint,14,opt,name=IsHaveValueAdd,proto3" json:"IsHaveValueAdd"` //有无增值选项
IsHaveValueAdd int64 `protobuf:"varint,14,opt,name=isHaveValueAdd,proto3" json:"isHaveValueAdd"` //有无增值选项
}
func (x *OrderRecordsRequest) Reset() {
@ -1016,6 +1016,7 @@ type ValueAddBundleProfile struct {
SavedAmount float32 `protobuf:"fixed32,7,opt,name=savedAmount,proto3" json:"savedAmount"`
DiscountPriceStatus bool `protobuf:"varint,8,opt,name=discountPriceStatus,proto3" json:"discountPriceStatus"`
Choose bool `protobuf:"varint,9,opt,name=choose,proto3" json:"choose"`
Status bool `protobuf:"varint,10,opt,name=status,proto3" json:"status"`
}
func (x *ValueAddBundleProfile) Reset() {
@ -1104,6 +1105,13 @@ func (x *ValueAddBundleProfile) GetChoose() bool {
return false
}
func (x *ValueAddBundleProfile) GetStatus() bool {
if x != nil {
return x.Status
}
return false
}
type CreateValueAddBundleRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1223,6 +1231,9 @@ type ValueAddBundleListRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId"`
BundleUuid string `protobuf:"bytes,2,opt,name=bundleUuid,proto3" json:"bundleUuid"`
}
func (x *ValueAddBundleListRequest) Reset() {
@ -1255,6 +1266,20 @@ func (*ValueAddBundleListRequest) Descriptor() ([]byte, []int) {
return file_pb_bundle_proto_rawDescGZIP(), []int{15}
}
func (x *ValueAddBundleListRequest) GetUserId() int32 {
if x != nil {
return x.UserId
}
return 0
}
func (x *ValueAddBundleListRequest) GetBundleUuid() string {
if x != nil {
return x.BundleUuid
}
return ""
}
type ValueAddBundleListResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1263,7 +1288,10 @@ type ValueAddBundleListResponse struct {
OriginalPrice float32 `protobuf:"fixed32,1,opt,name=originalPrice,proto3" json:"originalPrice"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Data []*ValueAddBundleProfile `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg"`
Status bool `protobuf:"varint,4,opt,name=status,proto3" json:"status"`
Num int32 `protobuf:"varint,5,opt,name=num,proto3" json:"num"`
Price float32 `protobuf:"fixed32,6,opt,name=price,proto3" json:"price"`
Msg string `protobuf:"bytes,7,opt,name=msg,proto3" json:"msg"`
}
func (x *ValueAddBundleListResponse) Reset() {
@ -1317,6 +1345,27 @@ func (x *ValueAddBundleListResponse) GetData() []*ValueAddBundleProfile {
return nil
}
func (x *ValueAddBundleListResponse) GetStatus() bool {
if x != nil {
return x.Status
}
return false
}
func (x *ValueAddBundleListResponse) GetNum() int32 {
if x != nil {
return x.Num
}
return 0
}
func (x *ValueAddBundleListResponse) GetPrice() float32 {
if x != nil {
return x.Price
}
return 0
}
func (x *ValueAddBundleListResponse) GetMsg() string {
if x != nil {
return x.Msg
@ -1560,9 +1609,9 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65,
0x6e, 0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x49, 0x73, 0x48,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x73, 0x48,
0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0e, 0x49, 0x73, 0x48, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64,
0x03, 0x52, 0x0e, 0x69, 0x73, 0x48, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64,
0x64, 0x22, 0x65, 0x0a, 0x14, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
@ -1582,7 +1631,7 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0b, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x95, 0x02, 0x0a, 0x15, 0x56,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xad, 0x02, 0x0a, 0x15, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18,
@ -1600,23 +1649,28 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50,
0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68,
0x6f, 0x6f, 0x73, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x6f,
0x73, 0x65, 0x22, 0x59, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x3a, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x28,
0xe2, 0xdf, 0x1f, 0x24, 0x10, 0x1d, 0x18, 0x65, 0x2a, 0x1e, 0xe8, 0x87, 0xb3, 0xe5, 0xb0, 0x91,
0xe6, 0x95, 0xb0, 0xe4, 0xb8, 0xba, 0x33, 0x30, 0x2c, 0xe6, 0x9c, 0x80, 0xe5, 0xa4, 0x9a, 0xe6,
0x95, 0xb0, 0xe4, 0xb8, 0xba, 0x31, 0x30, 0x30, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x86, 0x01,
0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75,
0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69,
0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x61, 0x76, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x73, 0x61, 0x76, 0x65, 0x64, 0x41, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x1b, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41,
0x64, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64,
0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x59, 0x0a, 0x1b, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x03, 0x6e, 0x75, 0x6d,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x28, 0xe2, 0xdf, 0x1f, 0x24, 0x10, 0x1d, 0x18, 0x65,
0x2a, 0x1e, 0xe8, 0x87, 0xb3, 0xe5, 0xb0, 0x91, 0xe6, 0x95, 0xb0, 0xe4, 0xb8, 0xba, 0x33, 0x30,
0x2c, 0xe6, 0x9c, 0x80, 0xe5, 0xa4, 0x9a, 0xe6, 0x95, 0xb0, 0xe4, 0xb8, 0xba, 0x31, 0x30, 0x30,
0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x86, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x61,
0x76, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52,
0x0b, 0x73, 0x61, 0x76, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x53,
0x0a, 0x19, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75,
0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65,
0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55,
0x75, 0x69, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72,
0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69,
@ -1625,7 +1679,11 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74,
0x61, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d,
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70,
0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6d, 0x73, 0x67, 0x22, 0x31, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,

View File

@ -1,6 +1,8 @@
package router
import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle"
"github.com/gin-gonic/gin"
@ -8,6 +10,7 @@ import (
func ValueAddBundleRouter(r *gin.RouterGroup) {
valueAddBundleRoute := r.Group("valueAdd-bundle")
valueAddBundleRoute.Use(middleware.CheckLogin(service.AccountProvider))
// 增值套餐
{

View File

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"fonchain-fiee/api/bundle"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"github.com/gin-gonic/gin"
@ -36,6 +37,11 @@ func ValueAddBundleList(c *gin.Context) {
return
}
// 获取 用户信息
userInfo := login.GetUserInfoFromC(c)
req.UserId = int32(userInfo.ID)
//req.UserId = 39
res, err := service.BundleProvider.ValueAddBundleList(context.Background(), &req)
if err != nil {
service.Error1(c, err)