diff --git a/api/bundle/bundle.pb.go b/api/bundle/bundle.pb.go index b8000c8..29d20e8 100644 --- a/api/bundle/bundle.pb.go +++ b/api/bundle/bundle.pb.go @@ -507,6 +507,11 @@ type OrderRecord struct { ValueAddBundleUuid string `protobuf:"bytes,21,opt,name=valueAddBundleUuid,proto3" json:"valueAddBundleUuid"` //增值套餐UUID ValueAddBundleAmount float32 `protobuf:"fixed32,27,opt,name=valueAddBundleAmount,proto3" json:"valueAddBundleAmount"` //增值套餐金额 TotalAmount float32 `protobuf:"fixed32,28,opt,name=totalAmount,proto3" json:"totalAmount"` //总金额 + Sex int32 `protobuf:"varint,29,opt,name=sex,proto3" json:"sex"` + Nationality string `protobuf:"bytes,30,opt,name=nationality,proto3" json:"nationality"` + CertificatePicture string `protobuf:"bytes,31,opt,name=certificatePicture,proto3" json:"certificatePicture"` + PlaceOfResidence string `protobuf:"bytes,32,opt,name=placeOfResidence,proto3" json:"placeOfResidence"` + GroupPhoto string `protobuf:"bytes,33,opt,name=groupPhoto,proto3" json:"groupPhoto"` } func (x *OrderRecord) Reset() { @@ -686,6 +691,41 @@ func (x *OrderRecord) GetTotalAmount() float32 { return 0 } +func (x *OrderRecord) GetSex() int32 { + if x != nil { + return x.Sex + } + return 0 +} + +func (x *OrderRecord) GetNationality() string { + if x != nil { + return x.Nationality + } + return "" +} + +func (x *OrderRecord) GetCertificatePicture() string { + if x != nil { + return x.CertificatePicture + } + return "" +} + +func (x *OrderRecord) GetPlaceOfResidence() string { + if x != nil { + return x.PlaceOfResidence + } + return "" +} + +func (x *OrderRecord) GetGroupPhoto() string { + if x != nil { + return x.GroupPhoto + } + return "" +} + type OrderRecordsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1537,7 +1577,7 @@ var file_pb_bundle_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xcb, 0x05, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, + 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xfb, 0x06, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -1582,7 +1622,18 @@ var file_pb_bundle_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd9, 0x03, 0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x1d, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x4f, 0x66, 0x52, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x20, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x52, 0x65, 0x73, 0x69, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x68, + 0x6f, 0x74, 0x6f, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x03, 0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, diff --git a/cmd/runtime/20250328174612.pdf b/cmd/runtime/20250328174612.pdf new file mode 100644 index 0000000..3d4c99a Binary files /dev/null and b/cmd/runtime/20250328174612.pdf differ diff --git a/cmd/runtime/20250328174729.pdf b/cmd/runtime/20250328174729.pdf new file mode 100644 index 0000000..bfdc730 Binary files /dev/null and b/cmd/runtime/20250328174729.pdf differ diff --git a/pkg/service/bundle/bundleOrder.go b/pkg/service/bundle/bundleOrder.go index 72f7088..ac1b065 100644 --- a/pkg/service/bundle/bundleOrder.go +++ b/pkg/service/bundle/bundleOrder.go @@ -3,6 +3,7 @@ package bundle import ( "context" "errors" + "fonchain-fiee/api/account" "fonchain-fiee/api/bundle" "fonchain-fiee/api/order" "fonchain-fiee/pkg/model/login" @@ -233,6 +234,30 @@ func OrderRecordsList(c *gin.Context) { return } + for _, orderRecord := range res.OrderRecords { + if orderRecord.CustomerID != "" { + var userID uint64 + userID, err = strconv.ParseUint(orderRecord.CustomerID, 10, 64) + if err != nil { + err = nil + continue + } + + userInfo, _ := service.AccountProvider.Info(context.Background(), &account.InfoRequest{ + Domain: "app", + ID: userID, + }) + if userInfo != nil { + orderRecord.Sex = userInfo.Sex + orderRecord.Nationality = userInfo.Nationality + orderRecord.CertificatePicture = userInfo.CertificatePicture + orderRecord.PlaceOfResidence = userInfo.PlaceOfResidence + orderRecord.GroupPhoto = userInfo.GroupPhoto + } + } + + } + service.Success(c, res) }