From 4398a442b440a017d9f443149bb9ce62a6b7f549 Mon Sep 17 00:00:00 2001 From: zhx Date: Tue, 26 May 2026 08:20:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E5=93=81=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/proto/wallet/v1/wallet.pb.go | 1093 ++++++++++------- api/proto/wallet/v1/wallet.proto | 19 + api/proto/wallet/v1/wallet_grpc.pb.go | 38 + docs/flutter对接/背包接口Flutter对接.md | 434 +++++++ docs/openapi/gateway.swagger.yaml | 13 +- .../internal/client/wallet_client.go | 5 + .../transport/http/httproutes/router.go | 2 + .../transport/http/resourceapi/handler.go | 4 + .../http/resourceapi/resource_handler.go | 86 ++ .../internal/transport/http/response_test.go | 13 + .../internal/transport/http/router.go | 1 + .../mysql/initdb/001_wallet_service.sql | 23 + .../internal/domain/resource/resource.go | 19 + .../internal/service/wallet/resource.go | 16 + .../internal/service/wallet/service.go | 1 + .../internal/service/wallet/service_test.go | 92 ++ .../storage/mysql/resource_repository.go | 232 +++- .../internal/testutil/mysqltest/mysqltest.go | 2 +- .../internal/transport/grpc/resource.go | 26 + 19 files changed, 1659 insertions(+), 460 deletions(-) create mode 100644 docs/flutter对接/背包接口Flutter对接.md diff --git a/api/proto/wallet/v1/wallet.pb.go b/api/proto/wallet/v1/wallet.pb.go index ea80decc..50087ac0 100644 --- a/api/proto/wallet/v1/wallet.pb.go +++ b/api/proto/wallet/v1/wallet.pb.go @@ -2037,6 +2037,7 @@ type UserResourceEntitlement struct { SourceGrantId string `protobuf:"bytes,11,opt,name=source_grant_id,json=sourceGrantId,proto3" json:"source_grant_id,omitempty"` CreatedAtMs int64 `protobuf:"varint,12,opt,name=created_at_ms,json=createdAtMs,proto3" json:"created_at_ms,omitempty"` UpdatedAtMs int64 `protobuf:"varint,13,opt,name=updated_at_ms,json=updatedAtMs,proto3" json:"updated_at_ms,omitempty"` + Equipped bool `protobuf:"varint,14,opt,name=equipped,proto3" json:"equipped,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2162,6 +2163,13 @@ func (x *UserResourceEntitlement) GetUpdatedAtMs() int64 { return 0 } +func (x *UserResourceEntitlement) GetEquipped() bool { + if x != nil { + return x.Equipped + } + return false +} + type ResourceGrantItem struct { state protoimpl.MessageState `protogen:"open.v1"` GrantItemId int64 `protobuf:"varint,1,opt,name=grant_item_id,json=grantItemId,proto3" json:"grant_item_id,omitempty"` @@ -5926,6 +5934,166 @@ func (x *ResourceShopItemResponse) GetItem() *ResourceShopItem { return nil } +type PurchaseResourceShopItemRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` + AppCode string `protobuf:"bytes,2,opt,name=app_code,json=appCode,proto3" json:"app_code,omitempty"` + UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ShopItemId int64 `protobuf:"varint,4,opt,name=shop_item_id,json=shopItemId,proto3" json:"shop_item_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PurchaseResourceShopItemRequest) Reset() { + *x = PurchaseResourceShopItemRequest{} + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PurchaseResourceShopItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PurchaseResourceShopItemRequest) ProtoMessage() {} + +func (x *PurchaseResourceShopItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PurchaseResourceShopItemRequest.ProtoReflect.Descriptor instead. +func (*PurchaseResourceShopItemRequest) Descriptor() ([]byte, []int) { + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{63} +} + +func (x *PurchaseResourceShopItemRequest) GetCommandId() string { + if x != nil { + return x.CommandId + } + return "" +} + +func (x *PurchaseResourceShopItemRequest) GetAppCode() string { + if x != nil { + return x.AppCode + } + return "" +} + +func (x *PurchaseResourceShopItemRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *PurchaseResourceShopItemRequest) GetShopItemId() int64 { + if x != nil { + return x.ShopItemId + } + return 0 +} + +type PurchaseResourceShopItemResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + ResourceGrantId string `protobuf:"bytes,3,opt,name=resource_grant_id,json=resourceGrantId,proto3" json:"resource_grant_id,omitempty"` + ShopItem *ResourceShopItem `protobuf:"bytes,4,opt,name=shop_item,json=shopItem,proto3" json:"shop_item,omitempty"` + Resource *UserResourceEntitlement `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` + Balance *AssetBalance `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance,omitempty"` + CoinSpent int64 `protobuf:"varint,7,opt,name=coin_spent,json=coinSpent,proto3" json:"coin_spent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PurchaseResourceShopItemResponse) Reset() { + *x = PurchaseResourceShopItemResponse{} + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PurchaseResourceShopItemResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PurchaseResourceShopItemResponse) ProtoMessage() {} + +func (x *PurchaseResourceShopItemResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PurchaseResourceShopItemResponse.ProtoReflect.Descriptor instead. +func (*PurchaseResourceShopItemResponse) Descriptor() ([]byte, []int) { + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{64} +} + +func (x *PurchaseResourceShopItemResponse) GetOrderId() string { + if x != nil { + return x.OrderId + } + return "" +} + +func (x *PurchaseResourceShopItemResponse) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *PurchaseResourceShopItemResponse) GetResourceGrantId() string { + if x != nil { + return x.ResourceGrantId + } + return "" +} + +func (x *PurchaseResourceShopItemResponse) GetShopItem() *ResourceShopItem { + if x != nil { + return x.ShopItem + } + return nil +} + +func (x *PurchaseResourceShopItemResponse) GetResource() *UserResourceEntitlement { + if x != nil { + return x.Resource + } + return nil +} + +func (x *PurchaseResourceShopItemResponse) GetBalance() *AssetBalance { + if x != nil { + return x.Balance + } + return nil +} + +func (x *PurchaseResourceShopItemResponse) GetCoinSpent() int64 { + if x != nil { + return x.CoinSpent + } + return 0 +} + type RechargeBill struct { state protoimpl.MessageState `protogen:"open.v1"` AppCode string `protobuf:"bytes,1,opt,name=app_code,json=appCode,proto3" json:"app_code,omitempty"` @@ -5952,7 +6120,7 @@ type RechargeBill struct { func (x *RechargeBill) Reset() { *x = RechargeBill{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5964,7 +6132,7 @@ func (x *RechargeBill) String() string { func (*RechargeBill) ProtoMessage() {} func (x *RechargeBill) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5977,7 +6145,7 @@ func (x *RechargeBill) ProtoReflect() protoreflect.Message { // Deprecated: Use RechargeBill.ProtoReflect.Descriptor instead. func (*RechargeBill) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{63} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{65} } func (x *RechargeBill) GetAppCode() string { @@ -6126,7 +6294,7 @@ type ListRechargeBillsRequest struct { func (x *ListRechargeBillsRequest) Reset() { *x = ListRechargeBillsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6138,7 +6306,7 @@ func (x *ListRechargeBillsRequest) String() string { func (*ListRechargeBillsRequest) ProtoMessage() {} func (x *ListRechargeBillsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6151,7 +6319,7 @@ func (x *ListRechargeBillsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRechargeBillsRequest.ProtoReflect.Descriptor instead. func (*ListRechargeBillsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{64} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{66} } func (x *ListRechargeBillsRequest) GetRequestId() string { @@ -6248,7 +6416,7 @@ type ListRechargeBillsResponse struct { func (x *ListRechargeBillsResponse) Reset() { *x = ListRechargeBillsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6260,7 +6428,7 @@ func (x *ListRechargeBillsResponse) String() string { func (*ListRechargeBillsResponse) ProtoMessage() {} func (x *ListRechargeBillsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6273,7 +6441,7 @@ func (x *ListRechargeBillsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRechargeBillsResponse.ProtoReflect.Descriptor instead. func (*ListRechargeBillsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{65} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{67} } func (x *ListRechargeBillsResponse) GetBills() []*RechargeBill { @@ -6302,7 +6470,7 @@ type WalletFeatureFlags struct { func (x *WalletFeatureFlags) Reset() { *x = WalletFeatureFlags{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6314,7 +6482,7 @@ func (x *WalletFeatureFlags) String() string { func (*WalletFeatureFlags) ProtoMessage() {} func (x *WalletFeatureFlags) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6327,7 +6495,7 @@ func (x *WalletFeatureFlags) ProtoReflect() protoreflect.Message { // Deprecated: Use WalletFeatureFlags.ProtoReflect.Descriptor instead. func (*WalletFeatureFlags) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{66} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{68} } func (x *WalletFeatureFlags) GetRechargeEnabled() bool { @@ -6362,7 +6530,7 @@ type GetWalletOverviewRequest struct { func (x *GetWalletOverviewRequest) Reset() { *x = GetWalletOverviewRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6374,7 +6542,7 @@ func (x *GetWalletOverviewRequest) String() string { func (*GetWalletOverviewRequest) ProtoMessage() {} func (x *GetWalletOverviewRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6387,7 +6555,7 @@ func (x *GetWalletOverviewRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletOverviewRequest.ProtoReflect.Descriptor instead. func (*GetWalletOverviewRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{67} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{69} } func (x *GetWalletOverviewRequest) GetRequestId() string { @@ -6421,7 +6589,7 @@ type GetWalletOverviewResponse struct { func (x *GetWalletOverviewResponse) Reset() { *x = GetWalletOverviewResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6433,7 +6601,7 @@ func (x *GetWalletOverviewResponse) String() string { func (*GetWalletOverviewResponse) ProtoMessage() {} func (x *GetWalletOverviewResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6446,7 +6614,7 @@ func (x *GetWalletOverviewResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletOverviewResponse.ProtoReflect.Descriptor instead. func (*GetWalletOverviewResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{68} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{70} } func (x *GetWalletOverviewResponse) GetBalances() []*AssetBalance { @@ -6474,7 +6642,7 @@ type WalletValueSummary struct { func (x *WalletValueSummary) Reset() { *x = WalletValueSummary{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6486,7 +6654,7 @@ func (x *WalletValueSummary) String() string { func (*WalletValueSummary) ProtoMessage() {} func (x *WalletValueSummary) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6499,7 +6667,7 @@ func (x *WalletValueSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use WalletValueSummary.ProtoReflect.Descriptor instead. func (*WalletValueSummary) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{69} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{71} } func (x *WalletValueSummary) GetCoinAmount() int64 { @@ -6527,7 +6695,7 @@ type GetWalletValueSummaryRequest struct { func (x *GetWalletValueSummaryRequest) Reset() { *x = GetWalletValueSummaryRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6539,7 +6707,7 @@ func (x *GetWalletValueSummaryRequest) String() string { func (*GetWalletValueSummaryRequest) ProtoMessage() {} func (x *GetWalletValueSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6552,7 +6720,7 @@ func (x *GetWalletValueSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletValueSummaryRequest.ProtoReflect.Descriptor instead. func (*GetWalletValueSummaryRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{70} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{72} } func (x *GetWalletValueSummaryRequest) GetRequestId() string { @@ -6585,7 +6753,7 @@ type GetWalletValueSummaryResponse struct { func (x *GetWalletValueSummaryResponse) Reset() { *x = GetWalletValueSummaryResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6597,7 +6765,7 @@ func (x *GetWalletValueSummaryResponse) String() string { func (*GetWalletValueSummaryResponse) ProtoMessage() {} func (x *GetWalletValueSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6610,7 +6778,7 @@ func (x *GetWalletValueSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWalletValueSummaryResponse.ProtoReflect.Descriptor instead. func (*GetWalletValueSummaryResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{71} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{73} } func (x *GetWalletValueSummaryResponse) GetSummary() *WalletValueSummary { @@ -6647,7 +6815,7 @@ type GiftWallItem struct { func (x *GiftWallItem) Reset() { *x = GiftWallItem{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6659,7 +6827,7 @@ func (x *GiftWallItem) String() string { func (*GiftWallItem) ProtoMessage() {} func (x *GiftWallItem) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6672,7 +6840,7 @@ func (x *GiftWallItem) ProtoReflect() protoreflect.Message { // Deprecated: Use GiftWallItem.ProtoReflect.Descriptor instead. func (*GiftWallItem) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{72} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{74} } func (x *GiftWallItem) GetGiftId() string { @@ -6812,7 +6980,7 @@ type GetUserGiftWallRequest struct { func (x *GetUserGiftWallRequest) Reset() { *x = GetUserGiftWallRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6824,7 +6992,7 @@ func (x *GetUserGiftWallRequest) String() string { func (*GetUserGiftWallRequest) ProtoMessage() {} func (x *GetUserGiftWallRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6837,7 +7005,7 @@ func (x *GetUserGiftWallRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserGiftWallRequest.ProtoReflect.Descriptor instead. func (*GetUserGiftWallRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{73} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{75} } func (x *GetUserGiftWallRequest) GetRequestId() string { @@ -6877,7 +7045,7 @@ type GetUserGiftWallResponse struct { func (x *GetUserGiftWallResponse) Reset() { *x = GetUserGiftWallResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6889,7 +7057,7 @@ func (x *GetUserGiftWallResponse) String() string { func (*GetUserGiftWallResponse) ProtoMessage() {} func (x *GetUserGiftWallResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6902,7 +7070,7 @@ func (x *GetUserGiftWallResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserGiftWallResponse.ProtoReflect.Descriptor instead. func (*GetUserGiftWallResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{74} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{76} } func (x *GetUserGiftWallResponse) GetItems() []*GiftWallItem { @@ -6991,7 +7159,7 @@ type RechargeProduct struct { func (x *RechargeProduct) Reset() { *x = RechargeProduct{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7003,7 +7171,7 @@ func (x *RechargeProduct) String() string { func (*RechargeProduct) ProtoMessage() {} func (x *RechargeProduct) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7016,7 +7184,7 @@ func (x *RechargeProduct) ProtoReflect() protoreflect.Message { // Deprecated: Use RechargeProduct.ProtoReflect.Descriptor instead. func (*RechargeProduct) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{75} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{77} } func (x *RechargeProduct) GetProductId() int64 { @@ -7180,7 +7348,7 @@ type ListRechargeProductsRequest struct { func (x *ListRechargeProductsRequest) Reset() { *x = ListRechargeProductsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7192,7 +7360,7 @@ func (x *ListRechargeProductsRequest) String() string { func (*ListRechargeProductsRequest) ProtoMessage() {} func (x *ListRechargeProductsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7205,7 +7373,7 @@ func (x *ListRechargeProductsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRechargeProductsRequest.ProtoReflect.Descriptor instead. func (*ListRechargeProductsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{76} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{78} } func (x *ListRechargeProductsRequest) GetRequestId() string { @@ -7253,7 +7421,7 @@ type ListRechargeProductsResponse struct { func (x *ListRechargeProductsResponse) Reset() { *x = ListRechargeProductsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7265,7 +7433,7 @@ func (x *ListRechargeProductsResponse) String() string { func (*ListRechargeProductsResponse) ProtoMessage() {} func (x *ListRechargeProductsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7278,7 +7446,7 @@ func (x *ListRechargeProductsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRechargeProductsResponse.ProtoReflect.Descriptor instead. func (*ListRechargeProductsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{77} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{79} } func (x *ListRechargeProductsResponse) GetProducts() []*RechargeProduct { @@ -7314,7 +7482,7 @@ type ConfirmGooglePaymentRequest struct { func (x *ConfirmGooglePaymentRequest) Reset() { *x = ConfirmGooglePaymentRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7326,7 +7494,7 @@ func (x *ConfirmGooglePaymentRequest) String() string { func (*ConfirmGooglePaymentRequest) ProtoMessage() {} func (x *ConfirmGooglePaymentRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7339,7 +7507,7 @@ func (x *ConfirmGooglePaymentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfirmGooglePaymentRequest.ProtoReflect.Descriptor instead. func (*ConfirmGooglePaymentRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{78} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{80} } func (x *ConfirmGooglePaymentRequest) GetRequestId() string { @@ -7436,7 +7604,7 @@ type ConfirmGooglePaymentResponse struct { func (x *ConfirmGooglePaymentResponse) Reset() { *x = ConfirmGooglePaymentResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7448,7 +7616,7 @@ func (x *ConfirmGooglePaymentResponse) String() string { func (*ConfirmGooglePaymentResponse) ProtoMessage() {} func (x *ConfirmGooglePaymentResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7461,7 +7629,7 @@ func (x *ConfirmGooglePaymentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfirmGooglePaymentResponse.ProtoReflect.Descriptor instead. func (*ConfirmGooglePaymentResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{79} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{81} } func (x *ConfirmGooglePaymentResponse) GetPaymentOrderId() string { @@ -7544,7 +7712,7 @@ type ListAdminRechargeProductsRequest struct { func (x *ListAdminRechargeProductsRequest) Reset() { *x = ListAdminRechargeProductsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7556,7 +7724,7 @@ func (x *ListAdminRechargeProductsRequest) String() string { func (*ListAdminRechargeProductsRequest) ProtoMessage() {} func (x *ListAdminRechargeProductsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7569,7 +7737,7 @@ func (x *ListAdminRechargeProductsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAdminRechargeProductsRequest.ProtoReflect.Descriptor instead. func (*ListAdminRechargeProductsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{80} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{82} } func (x *ListAdminRechargeProductsRequest) GetRequestId() string { @@ -7638,7 +7806,7 @@ type ListAdminRechargeProductsResponse struct { func (x *ListAdminRechargeProductsResponse) Reset() { *x = ListAdminRechargeProductsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7650,7 +7818,7 @@ func (x *ListAdminRechargeProductsResponse) String() string { func (*ListAdminRechargeProductsResponse) ProtoMessage() {} func (x *ListAdminRechargeProductsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7663,7 +7831,7 @@ func (x *ListAdminRechargeProductsResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ListAdminRechargeProductsResponse.ProtoReflect.Descriptor instead. func (*ListAdminRechargeProductsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{81} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{83} } func (x *ListAdminRechargeProductsResponse) GetProducts() []*RechargeProduct { @@ -7699,7 +7867,7 @@ type CreateRechargeProductRequest struct { func (x *CreateRechargeProductRequest) Reset() { *x = CreateRechargeProductRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7711,7 +7879,7 @@ func (x *CreateRechargeProductRequest) String() string { func (*CreateRechargeProductRequest) ProtoMessage() {} func (x *CreateRechargeProductRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7724,7 +7892,7 @@ func (x *CreateRechargeProductRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateRechargeProductRequest.ProtoReflect.Descriptor instead. func (*CreateRechargeProductRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{82} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{84} } func (x *CreateRechargeProductRequest) GetRequestId() string { @@ -7816,7 +7984,7 @@ type UpdateRechargeProductRequest struct { func (x *UpdateRechargeProductRequest) Reset() { *x = UpdateRechargeProductRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7828,7 +7996,7 @@ func (x *UpdateRechargeProductRequest) String() string { func (*UpdateRechargeProductRequest) ProtoMessage() {} func (x *UpdateRechargeProductRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7841,7 +8009,7 @@ func (x *UpdateRechargeProductRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateRechargeProductRequest.ProtoReflect.Descriptor instead. func (*UpdateRechargeProductRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{83} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{85} } func (x *UpdateRechargeProductRequest) GetRequestId() string { @@ -7933,7 +8101,7 @@ type DeleteRechargeProductRequest struct { func (x *DeleteRechargeProductRequest) Reset() { *x = DeleteRechargeProductRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7945,7 +8113,7 @@ func (x *DeleteRechargeProductRequest) String() string { func (*DeleteRechargeProductRequest) ProtoMessage() {} func (x *DeleteRechargeProductRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7958,7 +8126,7 @@ func (x *DeleteRechargeProductRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRechargeProductRequest.ProtoReflect.Descriptor instead. func (*DeleteRechargeProductRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{84} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{86} } func (x *DeleteRechargeProductRequest) GetRequestId() string { @@ -7998,7 +8166,7 @@ type RechargeProductResponse struct { func (x *RechargeProductResponse) Reset() { *x = RechargeProductResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8010,7 +8178,7 @@ func (x *RechargeProductResponse) String() string { func (*RechargeProductResponse) ProtoMessage() {} func (x *RechargeProductResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8023,7 +8191,7 @@ func (x *RechargeProductResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RechargeProductResponse.ProtoReflect.Descriptor instead. func (*RechargeProductResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{85} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{87} } func (x *RechargeProductResponse) GetProduct() *RechargeProduct { @@ -8042,7 +8210,7 @@ type DeleteRechargeProductResponse struct { func (x *DeleteRechargeProductResponse) Reset() { *x = DeleteRechargeProductResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8054,7 +8222,7 @@ func (x *DeleteRechargeProductResponse) String() string { func (*DeleteRechargeProductResponse) ProtoMessage() {} func (x *DeleteRechargeProductResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8067,7 +8235,7 @@ func (x *DeleteRechargeProductResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRechargeProductResponse.ProtoReflect.Descriptor instead. func (*DeleteRechargeProductResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{86} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{88} } func (x *DeleteRechargeProductResponse) GetDeleted() bool { @@ -8091,7 +8259,7 @@ type DiamondExchangeRule struct { func (x *DiamondExchangeRule) Reset() { *x = DiamondExchangeRule{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8103,7 +8271,7 @@ func (x *DiamondExchangeRule) String() string { func (*DiamondExchangeRule) ProtoMessage() {} func (x *DiamondExchangeRule) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8116,7 +8284,7 @@ func (x *DiamondExchangeRule) ProtoReflect() protoreflect.Message { // Deprecated: Use DiamondExchangeRule.ProtoReflect.Descriptor instead. func (*DiamondExchangeRule) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{87} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{89} } func (x *DiamondExchangeRule) GetExchangeType() string { @@ -8172,7 +8340,7 @@ type GetDiamondExchangeConfigRequest struct { func (x *GetDiamondExchangeConfigRequest) Reset() { *x = GetDiamondExchangeConfigRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8184,7 +8352,7 @@ func (x *GetDiamondExchangeConfigRequest) String() string { func (*GetDiamondExchangeConfigRequest) ProtoMessage() {} func (x *GetDiamondExchangeConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8197,7 +8365,7 @@ func (x *GetDiamondExchangeConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDiamondExchangeConfigRequest.ProtoReflect.Descriptor instead. func (*GetDiamondExchangeConfigRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{88} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{90} } func (x *GetDiamondExchangeConfigRequest) GetRequestId() string { @@ -8230,7 +8398,7 @@ type GetDiamondExchangeConfigResponse struct { func (x *GetDiamondExchangeConfigResponse) Reset() { *x = GetDiamondExchangeConfigResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8242,7 +8410,7 @@ func (x *GetDiamondExchangeConfigResponse) String() string { func (*GetDiamondExchangeConfigResponse) ProtoMessage() {} func (x *GetDiamondExchangeConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8255,7 +8423,7 @@ func (x *GetDiamondExchangeConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDiamondExchangeConfigResponse.ProtoReflect.Descriptor instead. func (*GetDiamondExchangeConfigResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{89} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{91} } func (x *GetDiamondExchangeConfigResponse) GetRules() []*DiamondExchangeRule { @@ -8285,7 +8453,7 @@ type WalletTransaction struct { func (x *WalletTransaction) Reset() { *x = WalletTransaction{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8297,7 +8465,7 @@ func (x *WalletTransaction) String() string { func (*WalletTransaction) ProtoMessage() {} func (x *WalletTransaction) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8310,7 +8478,7 @@ func (x *WalletTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use WalletTransaction.ProtoReflect.Descriptor instead. func (*WalletTransaction) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{90} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{92} } func (x *WalletTransaction) GetEntryId() int64 { @@ -8404,7 +8572,7 @@ type ListWalletTransactionsRequest struct { func (x *ListWalletTransactionsRequest) Reset() { *x = ListWalletTransactionsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8416,7 +8584,7 @@ func (x *ListWalletTransactionsRequest) String() string { func (*ListWalletTransactionsRequest) ProtoMessage() {} func (x *ListWalletTransactionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8429,7 +8597,7 @@ func (x *ListWalletTransactionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWalletTransactionsRequest.ProtoReflect.Descriptor instead. func (*ListWalletTransactionsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{91} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{93} } func (x *ListWalletTransactionsRequest) GetRequestId() string { @@ -8484,7 +8652,7 @@ type ListWalletTransactionsResponse struct { func (x *ListWalletTransactionsResponse) Reset() { *x = ListWalletTransactionsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8496,7 +8664,7 @@ func (x *ListWalletTransactionsResponse) String() string { func (*ListWalletTransactionsResponse) ProtoMessage() {} func (x *ListWalletTransactionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[94] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8509,7 +8677,7 @@ func (x *ListWalletTransactionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWalletTransactionsResponse.ProtoReflect.Descriptor instead. func (*ListWalletTransactionsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{92} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{94} } func (x *ListWalletTransactionsResponse) GetTransactions() []*WalletTransaction { @@ -8543,7 +8711,7 @@ type WithdrawalRequest struct { func (x *WithdrawalRequest) Reset() { *x = WithdrawalRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8555,7 +8723,7 @@ func (x *WithdrawalRequest) String() string { func (*WithdrawalRequest) ProtoMessage() {} func (x *WithdrawalRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[95] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8568,7 +8736,7 @@ func (x *WithdrawalRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WithdrawalRequest.ProtoReflect.Descriptor instead. func (*WithdrawalRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{93} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{95} } func (x *WithdrawalRequest) GetWithdrawalId() string { @@ -8648,7 +8816,7 @@ type ApplyWithdrawalRequest struct { func (x *ApplyWithdrawalRequest) Reset() { *x = ApplyWithdrawalRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[94] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8660,7 +8828,7 @@ func (x *ApplyWithdrawalRequest) String() string { func (*ApplyWithdrawalRequest) ProtoMessage() {} func (x *ApplyWithdrawalRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[94] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8673,7 +8841,7 @@ func (x *ApplyWithdrawalRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyWithdrawalRequest.ProtoReflect.Descriptor instead. func (*ApplyWithdrawalRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{94} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{96} } func (x *ApplyWithdrawalRequest) GetCommandId() string { @@ -8728,7 +8896,7 @@ type ApplyWithdrawalResponse struct { func (x *ApplyWithdrawalResponse) Reset() { *x = ApplyWithdrawalResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[95] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8740,7 +8908,7 @@ func (x *ApplyWithdrawalResponse) String() string { func (*ApplyWithdrawalResponse) ProtoMessage() {} func (x *ApplyWithdrawalResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[95] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[97] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8753,7 +8921,7 @@ func (x *ApplyWithdrawalResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyWithdrawalResponse.ProtoReflect.Descriptor instead. func (*ApplyWithdrawalResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{95} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{97} } func (x *ApplyWithdrawalResponse) GetWithdrawal() *WithdrawalRequest { @@ -8784,7 +8952,7 @@ type VipRewardItem struct { func (x *VipRewardItem) Reset() { *x = VipRewardItem{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[96] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8796,7 +8964,7 @@ func (x *VipRewardItem) String() string { func (*VipRewardItem) ProtoMessage() {} func (x *VipRewardItem) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[96] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8809,7 +8977,7 @@ func (x *VipRewardItem) ProtoReflect() protoreflect.Message { // Deprecated: Use VipRewardItem.ProtoReflect.Descriptor instead. func (*VipRewardItem) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{96} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{98} } func (x *VipRewardItem) GetResourceId() int64 { @@ -8877,7 +9045,7 @@ type VipLevel struct { func (x *VipLevel) Reset() { *x = VipLevel{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[97] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8889,7 +9057,7 @@ func (x *VipLevel) String() string { func (*VipLevel) ProtoMessage() {} func (x *VipLevel) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[97] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8902,7 +9070,7 @@ func (x *VipLevel) ProtoReflect() protoreflect.Message { // Deprecated: Use VipLevel.ProtoReflect.Descriptor instead. func (*VipLevel) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{97} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{99} } func (x *VipLevel) GetLevel() int32 { @@ -9025,7 +9193,7 @@ type UserVip struct { func (x *UserVip) Reset() { *x = UserVip{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[98] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9037,7 +9205,7 @@ func (x *UserVip) String() string { func (*UserVip) ProtoMessage() {} func (x *UserVip) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[98] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9050,7 +9218,7 @@ func (x *UserVip) ProtoReflect() protoreflect.Message { // Deprecated: Use UserVip.ProtoReflect.Descriptor instead. func (*UserVip) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{98} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{100} } func (x *UserVip) GetUserId() int64 { @@ -9113,7 +9281,7 @@ type ListVipPackagesRequest struct { func (x *ListVipPackagesRequest) Reset() { *x = ListVipPackagesRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[99] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9125,7 +9293,7 @@ func (x *ListVipPackagesRequest) String() string { func (*ListVipPackagesRequest) ProtoMessage() {} func (x *ListVipPackagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[99] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9138,7 +9306,7 @@ func (x *ListVipPackagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListVipPackagesRequest.ProtoReflect.Descriptor instead. func (*ListVipPackagesRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{99} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{101} } func (x *ListVipPackagesRequest) GetRequestId() string { @@ -9172,7 +9340,7 @@ type ListVipPackagesResponse struct { func (x *ListVipPackagesResponse) Reset() { *x = ListVipPackagesResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[100] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9184,7 +9352,7 @@ func (x *ListVipPackagesResponse) String() string { func (*ListVipPackagesResponse) ProtoMessage() {} func (x *ListVipPackagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[100] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9197,7 +9365,7 @@ func (x *ListVipPackagesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListVipPackagesResponse.ProtoReflect.Descriptor instead. func (*ListVipPackagesResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{100} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{102} } func (x *ListVipPackagesResponse) GetCurrentVip() *UserVip { @@ -9225,7 +9393,7 @@ type GetMyVipRequest struct { func (x *GetMyVipRequest) Reset() { *x = GetMyVipRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[101] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9237,7 +9405,7 @@ func (x *GetMyVipRequest) String() string { func (*GetMyVipRequest) ProtoMessage() {} func (x *GetMyVipRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[101] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[103] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9250,7 +9418,7 @@ func (x *GetMyVipRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMyVipRequest.ProtoReflect.Descriptor instead. func (*GetMyVipRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{101} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{103} } func (x *GetMyVipRequest) GetRequestId() string { @@ -9283,7 +9451,7 @@ type GetMyVipResponse struct { func (x *GetMyVipResponse) Reset() { *x = GetMyVipResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[102] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9295,7 +9463,7 @@ func (x *GetMyVipResponse) String() string { func (*GetMyVipResponse) ProtoMessage() {} func (x *GetMyVipResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[102] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[104] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9308,7 +9476,7 @@ func (x *GetMyVipResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMyVipResponse.ProtoReflect.Descriptor instead. func (*GetMyVipResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{102} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{104} } func (x *GetMyVipResponse) GetVip() *UserVip { @@ -9330,7 +9498,7 @@ type PurchaseVipRequest struct { func (x *PurchaseVipRequest) Reset() { *x = PurchaseVipRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[103] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9342,7 +9510,7 @@ func (x *PurchaseVipRequest) String() string { func (*PurchaseVipRequest) ProtoMessage() {} func (x *PurchaseVipRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[103] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[105] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9355,7 +9523,7 @@ func (x *PurchaseVipRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PurchaseVipRequest.ProtoReflect.Descriptor instead. func (*PurchaseVipRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{103} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{105} } func (x *PurchaseVipRequest) GetCommandId() string { @@ -9400,7 +9568,7 @@ type PurchaseVipResponse struct { func (x *PurchaseVipResponse) Reset() { *x = PurchaseVipResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[104] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9412,7 +9580,7 @@ func (x *PurchaseVipResponse) String() string { func (*PurchaseVipResponse) ProtoMessage() {} func (x *PurchaseVipResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[104] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[106] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9425,7 +9593,7 @@ func (x *PurchaseVipResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PurchaseVipResponse.ProtoReflect.Descriptor instead. func (*PurchaseVipResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{104} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{106} } func (x *PurchaseVipResponse) GetOrderId() string { @@ -9485,7 +9653,7 @@ type GrantVipRequest struct { func (x *GrantVipRequest) Reset() { *x = GrantVipRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[105] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9497,7 +9665,7 @@ func (x *GrantVipRequest) String() string { func (*GrantVipRequest) ProtoMessage() {} func (x *GrantVipRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[105] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[107] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9510,7 +9678,7 @@ func (x *GrantVipRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantVipRequest.ProtoReflect.Descriptor instead. func (*GrantVipRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{105} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{107} } func (x *GrantVipRequest) GetCommandId() string { @@ -9574,7 +9742,7 @@ type GrantVipResponse struct { func (x *GrantVipResponse) Reset() { *x = GrantVipResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[106] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9586,7 +9754,7 @@ func (x *GrantVipResponse) String() string { func (*GrantVipResponse) ProtoMessage() {} func (x *GrantVipResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[106] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[108] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9599,7 +9767,7 @@ func (x *GrantVipResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantVipResponse.ProtoReflect.Descriptor instead. func (*GrantVipResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{106} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{108} } func (x *GrantVipResponse) GetTransactionId() string { @@ -9646,7 +9814,7 @@ type AdminVipLevelInput struct { func (x *AdminVipLevelInput) Reset() { *x = AdminVipLevelInput{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[107] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9658,7 +9826,7 @@ func (x *AdminVipLevelInput) String() string { func (*AdminVipLevelInput) ProtoMessage() {} func (x *AdminVipLevelInput) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[107] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[109] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9671,7 +9839,7 @@ func (x *AdminVipLevelInput) ProtoReflect() protoreflect.Message { // Deprecated: Use AdminVipLevelInput.ProtoReflect.Descriptor instead. func (*AdminVipLevelInput) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{107} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{109} } func (x *AdminVipLevelInput) GetLevel() int32 { @@ -9740,7 +9908,7 @@ type ListAdminVipLevelsRequest struct { func (x *ListAdminVipLevelsRequest) Reset() { *x = ListAdminVipLevelsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[108] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9752,7 +9920,7 @@ func (x *ListAdminVipLevelsRequest) String() string { func (*ListAdminVipLevelsRequest) ProtoMessage() {} func (x *ListAdminVipLevelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[108] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[110] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9765,7 +9933,7 @@ func (x *ListAdminVipLevelsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAdminVipLevelsRequest.ProtoReflect.Descriptor instead. func (*ListAdminVipLevelsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{108} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{110} } func (x *ListAdminVipLevelsRequest) GetRequestId() string { @@ -9792,7 +9960,7 @@ type ListAdminVipLevelsResponse struct { func (x *ListAdminVipLevelsResponse) Reset() { *x = ListAdminVipLevelsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[109] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9804,7 +9972,7 @@ func (x *ListAdminVipLevelsResponse) String() string { func (*ListAdminVipLevelsResponse) ProtoMessage() {} func (x *ListAdminVipLevelsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[109] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[111] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9817,7 +9985,7 @@ func (x *ListAdminVipLevelsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAdminVipLevelsResponse.ProtoReflect.Descriptor instead. func (*ListAdminVipLevelsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{109} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{111} } func (x *ListAdminVipLevelsResponse) GetLevels() []*VipLevel { @@ -9846,7 +10014,7 @@ type UpdateAdminVipLevelsRequest struct { func (x *UpdateAdminVipLevelsRequest) Reset() { *x = UpdateAdminVipLevelsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[110] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9858,7 +10026,7 @@ func (x *UpdateAdminVipLevelsRequest) String() string { func (*UpdateAdminVipLevelsRequest) ProtoMessage() {} func (x *UpdateAdminVipLevelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[110] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[112] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9871,7 +10039,7 @@ func (x *UpdateAdminVipLevelsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateAdminVipLevelsRequest.ProtoReflect.Descriptor instead. func (*UpdateAdminVipLevelsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{110} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{112} } func (x *UpdateAdminVipLevelsRequest) GetRequestId() string { @@ -9912,7 +10080,7 @@ type UpdateAdminVipLevelsResponse struct { func (x *UpdateAdminVipLevelsResponse) Reset() { *x = UpdateAdminVipLevelsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[111] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9924,7 +10092,7 @@ func (x *UpdateAdminVipLevelsResponse) String() string { func (*UpdateAdminVipLevelsResponse) ProtoMessage() {} func (x *UpdateAdminVipLevelsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[111] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[113] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9937,7 +10105,7 @@ func (x *UpdateAdminVipLevelsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateAdminVipLevelsResponse.ProtoReflect.Descriptor instead. func (*UpdateAdminVipLevelsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{111} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{113} } func (x *UpdateAdminVipLevelsResponse) GetLevels() []*VipLevel { @@ -9971,7 +10139,7 @@ type CreditTaskRewardRequest struct { func (x *CreditTaskRewardRequest) Reset() { *x = CreditTaskRewardRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[112] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9983,7 +10151,7 @@ func (x *CreditTaskRewardRequest) String() string { func (*CreditTaskRewardRequest) ProtoMessage() {} func (x *CreditTaskRewardRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[112] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[114] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9996,7 +10164,7 @@ func (x *CreditTaskRewardRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditTaskRewardRequest.ProtoReflect.Descriptor instead. func (*CreditTaskRewardRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{112} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{114} } func (x *CreditTaskRewardRequest) GetCommandId() string { @@ -10068,7 +10236,7 @@ type CreditTaskRewardResponse struct { func (x *CreditTaskRewardResponse) Reset() { *x = CreditTaskRewardResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[113] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10080,7 +10248,7 @@ func (x *CreditTaskRewardResponse) String() string { func (*CreditTaskRewardResponse) ProtoMessage() {} func (x *CreditTaskRewardResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[113] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[115] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10093,7 +10261,7 @@ func (x *CreditTaskRewardResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditTaskRewardResponse.ProtoReflect.Descriptor instead. func (*CreditTaskRewardResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{113} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{115} } func (x *CreditTaskRewardResponse) GetTransactionId() string { @@ -10142,7 +10310,7 @@ type CreditLuckyGiftRewardRequest struct { func (x *CreditLuckyGiftRewardRequest) Reset() { *x = CreditLuckyGiftRewardRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[114] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10154,7 +10322,7 @@ func (x *CreditLuckyGiftRewardRequest) String() string { func (*CreditLuckyGiftRewardRequest) ProtoMessage() {} func (x *CreditLuckyGiftRewardRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[114] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[116] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10167,7 +10335,7 @@ func (x *CreditLuckyGiftRewardRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditLuckyGiftRewardRequest.ProtoReflect.Descriptor instead. func (*CreditLuckyGiftRewardRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{114} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{116} } func (x *CreditLuckyGiftRewardRequest) GetCommandId() string { @@ -10246,7 +10414,7 @@ type CreditLuckyGiftRewardResponse struct { func (x *CreditLuckyGiftRewardResponse) Reset() { *x = CreditLuckyGiftRewardResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[115] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10258,7 +10426,7 @@ func (x *CreditLuckyGiftRewardResponse) String() string { func (*CreditLuckyGiftRewardResponse) ProtoMessage() {} func (x *CreditLuckyGiftRewardResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[115] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[117] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10271,7 +10439,7 @@ func (x *CreditLuckyGiftRewardResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditLuckyGiftRewardResponse.ProtoReflect.Descriptor instead. func (*CreditLuckyGiftRewardResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{115} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{117} } func (x *CreditLuckyGiftRewardResponse) GetTransactionId() string { @@ -10323,7 +10491,7 @@ type ApplyGameCoinChangeRequest struct { func (x *ApplyGameCoinChangeRequest) Reset() { *x = ApplyGameCoinChangeRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[116] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10335,7 +10503,7 @@ func (x *ApplyGameCoinChangeRequest) String() string { func (*ApplyGameCoinChangeRequest) ProtoMessage() {} func (x *ApplyGameCoinChangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[116] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[118] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10348,7 +10516,7 @@ func (x *ApplyGameCoinChangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyGameCoinChangeRequest.ProtoReflect.Descriptor instead. func (*ApplyGameCoinChangeRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{116} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{118} } func (x *ApplyGameCoinChangeRequest) GetRequestId() string { @@ -10447,7 +10615,7 @@ type ApplyGameCoinChangeResponse struct { func (x *ApplyGameCoinChangeResponse) Reset() { *x = ApplyGameCoinChangeResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[117] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10459,7 +10627,7 @@ func (x *ApplyGameCoinChangeResponse) String() string { func (*ApplyGameCoinChangeResponse) ProtoMessage() {} func (x *ApplyGameCoinChangeResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[117] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[119] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10472,7 +10640,7 @@ func (x *ApplyGameCoinChangeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyGameCoinChangeResponse.ProtoReflect.Descriptor instead. func (*ApplyGameCoinChangeResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{117} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{119} } func (x *ApplyGameCoinChangeResponse) GetWalletTransactionId() string { @@ -10514,7 +10682,7 @@ type RedPacketConfig struct { func (x *RedPacketConfig) Reset() { *x = RedPacketConfig{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[118] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10526,7 +10694,7 @@ func (x *RedPacketConfig) String() string { func (*RedPacketConfig) ProtoMessage() {} func (x *RedPacketConfig) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[118] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[120] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10539,7 +10707,7 @@ func (x *RedPacketConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use RedPacketConfig.ProtoReflect.Descriptor instead. func (*RedPacketConfig) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{118} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{120} } func (x *RedPacketConfig) GetAppCode() string { @@ -10631,7 +10799,7 @@ type RedPacketClaim struct { func (x *RedPacketClaim) Reset() { *x = RedPacketClaim{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[119] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10643,7 +10811,7 @@ func (x *RedPacketClaim) String() string { func (*RedPacketClaim) ProtoMessage() {} func (x *RedPacketClaim) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[119] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[121] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10656,7 +10824,7 @@ func (x *RedPacketClaim) ProtoReflect() protoreflect.Message { // Deprecated: Use RedPacketClaim.ProtoReflect.Descriptor instead. func (*RedPacketClaim) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{119} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{121} } func (x *RedPacketClaim) GetAppCode() string { @@ -10763,7 +10931,7 @@ type RedPacket struct { func (x *RedPacket) Reset() { *x = RedPacket{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[120] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10775,7 +10943,7 @@ func (x *RedPacket) String() string { func (*RedPacket) ProtoMessage() {} func (x *RedPacket) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[120] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[122] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10788,7 +10956,7 @@ func (x *RedPacket) ProtoReflect() protoreflect.Message { // Deprecated: Use RedPacket.ProtoReflect.Descriptor instead. func (*RedPacket) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{120} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{122} } func (x *RedPacket) GetAppCode() string { @@ -10934,7 +11102,7 @@ type GetRedPacketConfigRequest struct { func (x *GetRedPacketConfigRequest) Reset() { *x = GetRedPacketConfigRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[121] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10946,7 +11114,7 @@ func (x *GetRedPacketConfigRequest) String() string { func (*GetRedPacketConfigRequest) ProtoMessage() {} func (x *GetRedPacketConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[121] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[123] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10959,7 +11127,7 @@ func (x *GetRedPacketConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRedPacketConfigRequest.ProtoReflect.Descriptor instead. func (*GetRedPacketConfigRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{121} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{123} } func (x *GetRedPacketConfigRequest) GetRequestId() string { @@ -10986,7 +11154,7 @@ type GetRedPacketConfigResponse struct { func (x *GetRedPacketConfigResponse) Reset() { *x = GetRedPacketConfigResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[122] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10998,7 +11166,7 @@ func (x *GetRedPacketConfigResponse) String() string { func (*GetRedPacketConfigResponse) ProtoMessage() {} func (x *GetRedPacketConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[122] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[124] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11011,7 +11179,7 @@ func (x *GetRedPacketConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRedPacketConfigResponse.ProtoReflect.Descriptor instead. func (*GetRedPacketConfigResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{122} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{124} } func (x *GetRedPacketConfigResponse) GetConfig() *RedPacketConfig { @@ -11045,7 +11213,7 @@ type UpdateRedPacketConfigRequest struct { func (x *UpdateRedPacketConfigRequest) Reset() { *x = UpdateRedPacketConfigRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[123] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11057,7 +11225,7 @@ func (x *UpdateRedPacketConfigRequest) String() string { func (*UpdateRedPacketConfigRequest) ProtoMessage() {} func (x *UpdateRedPacketConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[123] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[125] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11070,7 +11238,7 @@ func (x *UpdateRedPacketConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateRedPacketConfigRequest.ProtoReflect.Descriptor instead. func (*UpdateRedPacketConfigRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{123} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{125} } func (x *UpdateRedPacketConfigRequest) GetRequestId() string { @@ -11146,7 +11314,7 @@ type UpdateRedPacketConfigResponse struct { func (x *UpdateRedPacketConfigResponse) Reset() { *x = UpdateRedPacketConfigResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[124] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11158,7 +11326,7 @@ func (x *UpdateRedPacketConfigResponse) String() string { func (*UpdateRedPacketConfigResponse) ProtoMessage() {} func (x *UpdateRedPacketConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[124] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[126] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11171,7 +11339,7 @@ func (x *UpdateRedPacketConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateRedPacketConfigResponse.ProtoReflect.Descriptor instead. func (*UpdateRedPacketConfigResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{124} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{126} } func (x *UpdateRedPacketConfigResponse) GetConfig() *RedPacketConfig { @@ -11205,7 +11373,7 @@ type CreateRedPacketRequest struct { func (x *CreateRedPacketRequest) Reset() { *x = CreateRedPacketRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[125] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11217,7 +11385,7 @@ func (x *CreateRedPacketRequest) String() string { func (*CreateRedPacketRequest) ProtoMessage() {} func (x *CreateRedPacketRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[125] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[127] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11230,7 +11398,7 @@ func (x *CreateRedPacketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateRedPacketRequest.ProtoReflect.Descriptor instead. func (*CreateRedPacketRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{125} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{127} } func (x *CreateRedPacketRequest) GetRequestId() string { @@ -11307,7 +11475,7 @@ type CreateRedPacketResponse struct { func (x *CreateRedPacketResponse) Reset() { *x = CreateRedPacketResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[126] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11319,7 +11487,7 @@ func (x *CreateRedPacketResponse) String() string { func (*CreateRedPacketResponse) ProtoMessage() {} func (x *CreateRedPacketResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[126] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[128] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11332,7 +11500,7 @@ func (x *CreateRedPacketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateRedPacketResponse.ProtoReflect.Descriptor instead. func (*CreateRedPacketResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{126} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{128} } func (x *CreateRedPacketResponse) GetPacket() *RedPacket { @@ -11369,7 +11537,7 @@ type ClaimRedPacketRequest struct { func (x *ClaimRedPacketRequest) Reset() { *x = ClaimRedPacketRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[127] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11381,7 +11549,7 @@ func (x *ClaimRedPacketRequest) String() string { func (*ClaimRedPacketRequest) ProtoMessage() {} func (x *ClaimRedPacketRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[127] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[129] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11394,7 +11562,7 @@ func (x *ClaimRedPacketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ClaimRedPacketRequest.ProtoReflect.Descriptor instead. func (*ClaimRedPacketRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{127} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{129} } func (x *ClaimRedPacketRequest) GetRequestId() string { @@ -11443,7 +11611,7 @@ type ClaimRedPacketResponse struct { func (x *ClaimRedPacketResponse) Reset() { *x = ClaimRedPacketResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[128] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11455,7 +11623,7 @@ func (x *ClaimRedPacketResponse) String() string { func (*ClaimRedPacketResponse) ProtoMessage() {} func (x *ClaimRedPacketResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[128] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[130] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11468,7 +11636,7 @@ func (x *ClaimRedPacketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ClaimRedPacketResponse.ProtoReflect.Descriptor instead. func (*ClaimRedPacketResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{128} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{130} } func (x *ClaimRedPacketResponse) GetClaim() *RedPacketClaim { @@ -11512,7 +11680,7 @@ type ListRedPacketsRequest struct { func (x *ListRedPacketsRequest) Reset() { *x = ListRedPacketsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[129] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11524,7 +11692,7 @@ func (x *ListRedPacketsRequest) String() string { func (*ListRedPacketsRequest) ProtoMessage() {} func (x *ListRedPacketsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[129] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[131] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11537,7 +11705,7 @@ func (x *ListRedPacketsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRedPacketsRequest.ProtoReflect.Descriptor instead. func (*ListRedPacketsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{129} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{131} } func (x *ListRedPacketsRequest) GetRequestId() string { @@ -11635,7 +11803,7 @@ type ListRedPacketsResponse struct { func (x *ListRedPacketsResponse) Reset() { *x = ListRedPacketsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[130] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11647,7 +11815,7 @@ func (x *ListRedPacketsResponse) String() string { func (*ListRedPacketsResponse) ProtoMessage() {} func (x *ListRedPacketsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[130] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[132] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11660,7 +11828,7 @@ func (x *ListRedPacketsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRedPacketsResponse.ProtoReflect.Descriptor instead. func (*ListRedPacketsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{130} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{132} } func (x *ListRedPacketsResponse) GetPackets() []*RedPacket { @@ -11697,7 +11865,7 @@ type GetRedPacketRequest struct { func (x *GetRedPacketRequest) Reset() { *x = GetRedPacketRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[131] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11709,7 +11877,7 @@ func (x *GetRedPacketRequest) String() string { func (*GetRedPacketRequest) ProtoMessage() {} func (x *GetRedPacketRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[131] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[133] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11722,7 +11890,7 @@ func (x *GetRedPacketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRedPacketRequest.ProtoReflect.Descriptor instead. func (*GetRedPacketRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{131} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{133} } func (x *GetRedPacketRequest) GetRequestId() string { @@ -11770,7 +11938,7 @@ type GetRedPacketResponse struct { func (x *GetRedPacketResponse) Reset() { *x = GetRedPacketResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[132] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11782,7 +11950,7 @@ func (x *GetRedPacketResponse) String() string { func (*GetRedPacketResponse) ProtoMessage() {} func (x *GetRedPacketResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[132] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[134] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11795,7 +11963,7 @@ func (x *GetRedPacketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRedPacketResponse.ProtoReflect.Descriptor instead. func (*GetRedPacketResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{132} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{134} } func (x *GetRedPacketResponse) GetPacket() *RedPacket { @@ -11823,7 +11991,7 @@ type ExpireRedPacketsRequest struct { func (x *ExpireRedPacketsRequest) Reset() { *x = ExpireRedPacketsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[133] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11835,7 +12003,7 @@ func (x *ExpireRedPacketsRequest) String() string { func (*ExpireRedPacketsRequest) ProtoMessage() {} func (x *ExpireRedPacketsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[133] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[135] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11848,7 +12016,7 @@ func (x *ExpireRedPacketsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExpireRedPacketsRequest.ProtoReflect.Descriptor instead. func (*ExpireRedPacketsRequest) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{133} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{135} } func (x *ExpireRedPacketsRequest) GetRequestId() string { @@ -11883,7 +12051,7 @@ type ExpireRedPacketsResponse struct { func (x *ExpireRedPacketsResponse) Reset() { *x = ExpireRedPacketsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[134] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11895,7 +12063,7 @@ func (x *ExpireRedPacketsResponse) String() string { func (*ExpireRedPacketsResponse) ProtoMessage() {} func (x *ExpireRedPacketsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[134] + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[136] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11908,7 +12076,7 @@ func (x *ExpireRedPacketsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExpireRedPacketsResponse.ProtoReflect.Descriptor instead. func (*ExpireRedPacketsResponse) Descriptor() ([]byte, []int) { - return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{134} + return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{136} } func (x *ExpireRedPacketsResponse) GetExpiredCount() int32 { @@ -12172,7 +12340,7 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" + "\x12created_by_user_id\x18\f \x01(\x03R\x0fcreatedByUserId\x12+\n" + "\x12updated_by_user_id\x18\r \x01(\x03R\x0fupdatedByUserId\x12\"\n" + "\rcreated_at_ms\x18\x0e \x01(\x03R\vcreatedAtMs\x12\"\n" + - "\rupdated_at_ms\x18\x0f \x01(\x03R\vupdatedAtMs\"\xeb\x03\n" + + "\rupdated_at_ms\x18\x0f \x01(\x03R\vupdatedAtMs\"\x87\x04\n" + "\x17UserResourceEntitlement\x12\x19\n" + "\bapp_code\x18\x01 \x01(\tR\aappCode\x12%\n" + "\x0eentitlement_id\x18\x02 \x01(\tR\rentitlementId\x12\x17\n" + @@ -12188,7 +12356,8 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" + " \x01(\x03R\vexpiresAtMs\x12&\n" + "\x0fsource_grant_id\x18\v \x01(\tR\rsourceGrantId\x12\"\n" + "\rcreated_at_ms\x18\f \x01(\x03R\vcreatedAtMs\x12\"\n" + - "\rupdated_at_ms\x18\r \x01(\x03R\vupdatedAtMs\"\x86\x03\n" + + "\rupdated_at_ms\x18\r \x01(\x03R\vupdatedAtMs\x12\x1a\n" + + "\bequipped\x18\x0e \x01(\bR\bequipped\"\x86\x03\n" + "\x11ResourceGrantItem\x12\"\n" + "\rgrant_item_id\x18\x01 \x01(\x03R\vgrantItemId\x12\x19\n" + "\bgrant_id\x18\x02 \x01(\tR\agrantId\x12\x1f\n" + @@ -12581,7 +12750,23 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" + "\x06status\x18\x04 \x01(\tR\x06status\x12(\n" + "\x10operator_user_id\x18\x05 \x01(\x03R\x0eoperatorUserId\"Q\n" + "\x18ResourceShopItemResponse\x125\n" + - "\x04item\x18\x01 \x01(\v2!.hyapp.wallet.v1.ResourceShopItemR\x04item\"\xa7\x05\n" + + "\x04item\x18\x01 \x01(\v2!.hyapp.wallet.v1.ResourceShopItemR\x04item\"\x96\x01\n" + + "\x1fPurchaseResourceShopItemRequest\x12\x1d\n" + + "\n" + + "command_id\x18\x01 \x01(\tR\tcommandId\x12\x19\n" + + "\bapp_code\x18\x02 \x01(\tR\aappCode\x12\x17\n" + + "\auser_id\x18\x03 \x01(\x03R\x06userId\x12 \n" + + "\fshop_item_id\x18\x04 \x01(\x03R\n" + + "shopItemId\"\xee\x02\n" + + " PurchaseResourceShopItemResponse\x12\x19\n" + + "\border_id\x18\x01 \x01(\tR\aorderId\x12%\n" + + "\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\x12*\n" + + "\x11resource_grant_id\x18\x03 \x01(\tR\x0fresourceGrantId\x12>\n" + + "\tshop_item\x18\x04 \x01(\v2!.hyapp.wallet.v1.ResourceShopItemR\bshopItem\x12D\n" + + "\bresource\x18\x05 \x01(\v2(.hyapp.wallet.v1.UserResourceEntitlementR\bresource\x127\n" + + "\abalance\x18\x06 \x01(\v2\x1d.hyapp.wallet.v1.AssetBalanceR\abalance\x12\x1d\n" + + "\n" + + "coin_spent\x18\a \x01(\x03R\tcoinSpent\"\xa7\x05\n" + "\fRechargeBill\x12\x19\n" + "\bapp_code\x18\x01 \x01(\tR\aappCode\x12%\n" + "\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\x12\x1d\n" + @@ -13171,7 +13356,7 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" + "\x18ExpireRedPacketsResponse\x12#\n" + "\rexpired_count\x18\x01 \x01(\x05R\fexpiredCount\x12'\n" + "\x0frefunded_amount\x18\x02 \x01(\x03R\x0erefundedAmount\x12$\n" + - "\x0eserver_time_ms\x18\x03 \x01(\x03R\fserverTimeMs2\xef0\n" + + "\x0eserver_time_ms\x18\x03 \x01(\x03R\fserverTimeMs2\xf01\n" + "\rWalletService\x12R\n" + "\tDebitGift\x12!.hyapp.wallet.v1.DebitGiftRequest\x1a\".hyapp.wallet.v1.DebitGiftResponse\x12X\n" + "\vGetBalances\x12#.hyapp.wallet.v1.GetBalancesRequest\x1a$.hyapp.wallet.v1.GetBalancesResponse\x12g\n" + @@ -13201,7 +13386,8 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" + "\x12ListResourceGrants\x12*.hyapp.wallet.v1.ListResourceGrantsRequest\x1a+.hyapp.wallet.v1.ListResourceGrantsResponse\x12v\n" + "\x15ListResourceShopItems\x12-.hyapp.wallet.v1.ListResourceShopItemsRequest\x1a..hyapp.wallet.v1.ListResourceShopItemsResponse\x12|\n" + "\x17UpsertResourceShopItems\x12/.hyapp.wallet.v1.UpsertResourceShopItemsRequest\x1a0.hyapp.wallet.v1.UpsertResourceShopItemsResponse\x12y\n" + - "\x19SetResourceShopItemStatus\x121.hyapp.wallet.v1.SetResourceShopItemStatusRequest\x1a).hyapp.wallet.v1.ResourceShopItemResponse\x12j\n" + + "\x19SetResourceShopItemStatus\x121.hyapp.wallet.v1.SetResourceShopItemStatusRequest\x1a).hyapp.wallet.v1.ResourceShopItemResponse\x12\x7f\n" + + "\x18PurchaseResourceShopItem\x120.hyapp.wallet.v1.PurchaseResourceShopItemRequest\x1a1.hyapp.wallet.v1.PurchaseResourceShopItemResponse\x12j\n" + "\x11ListRechargeBills\x12).hyapp.wallet.v1.ListRechargeBillsRequest\x1a*.hyapp.wallet.v1.ListRechargeBillsResponse\x12j\n" + "\x11GetWalletOverview\x12).hyapp.wallet.v1.GetWalletOverviewRequest\x1a*.hyapp.wallet.v1.GetWalletOverviewResponse\x12v\n" + "\x15GetWalletValueSummary\x12-.hyapp.wallet.v1.GetWalletValueSummaryRequest\x1a..hyapp.wallet.v1.GetWalletValueSummaryResponse\x12d\n" + @@ -13244,7 +13430,7 @@ func file_proto_wallet_v1_wallet_proto_rawDescGZIP() []byte { return file_proto_wallet_v1_wallet_proto_rawDescData } -var file_proto_wallet_v1_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 135) +var file_proto_wallet_v1_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 137) var file_proto_wallet_v1_wallet_proto_goTypes = []any{ (*DebitGiftRequest)(nil), // 0: hyapp.wallet.v1.DebitGiftRequest (*DebitGiftResponse)(nil), // 1: hyapp.wallet.v1.DebitGiftResponse @@ -13309,78 +13495,80 @@ var file_proto_wallet_v1_wallet_proto_goTypes = []any{ (*UpsertResourceShopItemsResponse)(nil), // 60: hyapp.wallet.v1.UpsertResourceShopItemsResponse (*SetResourceShopItemStatusRequest)(nil), // 61: hyapp.wallet.v1.SetResourceShopItemStatusRequest (*ResourceShopItemResponse)(nil), // 62: hyapp.wallet.v1.ResourceShopItemResponse - (*RechargeBill)(nil), // 63: hyapp.wallet.v1.RechargeBill - (*ListRechargeBillsRequest)(nil), // 64: hyapp.wallet.v1.ListRechargeBillsRequest - (*ListRechargeBillsResponse)(nil), // 65: hyapp.wallet.v1.ListRechargeBillsResponse - (*WalletFeatureFlags)(nil), // 66: hyapp.wallet.v1.WalletFeatureFlags - (*GetWalletOverviewRequest)(nil), // 67: hyapp.wallet.v1.GetWalletOverviewRequest - (*GetWalletOverviewResponse)(nil), // 68: hyapp.wallet.v1.GetWalletOverviewResponse - (*WalletValueSummary)(nil), // 69: hyapp.wallet.v1.WalletValueSummary - (*GetWalletValueSummaryRequest)(nil), // 70: hyapp.wallet.v1.GetWalletValueSummaryRequest - (*GetWalletValueSummaryResponse)(nil), // 71: hyapp.wallet.v1.GetWalletValueSummaryResponse - (*GiftWallItem)(nil), // 72: hyapp.wallet.v1.GiftWallItem - (*GetUserGiftWallRequest)(nil), // 73: hyapp.wallet.v1.GetUserGiftWallRequest - (*GetUserGiftWallResponse)(nil), // 74: hyapp.wallet.v1.GetUserGiftWallResponse - (*RechargeProduct)(nil), // 75: hyapp.wallet.v1.RechargeProduct - (*ListRechargeProductsRequest)(nil), // 76: hyapp.wallet.v1.ListRechargeProductsRequest - (*ListRechargeProductsResponse)(nil), // 77: hyapp.wallet.v1.ListRechargeProductsResponse - (*ConfirmGooglePaymentRequest)(nil), // 78: hyapp.wallet.v1.ConfirmGooglePaymentRequest - (*ConfirmGooglePaymentResponse)(nil), // 79: hyapp.wallet.v1.ConfirmGooglePaymentResponse - (*ListAdminRechargeProductsRequest)(nil), // 80: hyapp.wallet.v1.ListAdminRechargeProductsRequest - (*ListAdminRechargeProductsResponse)(nil), // 81: hyapp.wallet.v1.ListAdminRechargeProductsResponse - (*CreateRechargeProductRequest)(nil), // 82: hyapp.wallet.v1.CreateRechargeProductRequest - (*UpdateRechargeProductRequest)(nil), // 83: hyapp.wallet.v1.UpdateRechargeProductRequest - (*DeleteRechargeProductRequest)(nil), // 84: hyapp.wallet.v1.DeleteRechargeProductRequest - (*RechargeProductResponse)(nil), // 85: hyapp.wallet.v1.RechargeProductResponse - (*DeleteRechargeProductResponse)(nil), // 86: hyapp.wallet.v1.DeleteRechargeProductResponse - (*DiamondExchangeRule)(nil), // 87: hyapp.wallet.v1.DiamondExchangeRule - (*GetDiamondExchangeConfigRequest)(nil), // 88: hyapp.wallet.v1.GetDiamondExchangeConfigRequest - (*GetDiamondExchangeConfigResponse)(nil), // 89: hyapp.wallet.v1.GetDiamondExchangeConfigResponse - (*WalletTransaction)(nil), // 90: hyapp.wallet.v1.WalletTransaction - (*ListWalletTransactionsRequest)(nil), // 91: hyapp.wallet.v1.ListWalletTransactionsRequest - (*ListWalletTransactionsResponse)(nil), // 92: hyapp.wallet.v1.ListWalletTransactionsResponse - (*WithdrawalRequest)(nil), // 93: hyapp.wallet.v1.WithdrawalRequest - (*ApplyWithdrawalRequest)(nil), // 94: hyapp.wallet.v1.ApplyWithdrawalRequest - (*ApplyWithdrawalResponse)(nil), // 95: hyapp.wallet.v1.ApplyWithdrawalResponse - (*VipRewardItem)(nil), // 96: hyapp.wallet.v1.VipRewardItem - (*VipLevel)(nil), // 97: hyapp.wallet.v1.VipLevel - (*UserVip)(nil), // 98: hyapp.wallet.v1.UserVip - (*ListVipPackagesRequest)(nil), // 99: hyapp.wallet.v1.ListVipPackagesRequest - (*ListVipPackagesResponse)(nil), // 100: hyapp.wallet.v1.ListVipPackagesResponse - (*GetMyVipRequest)(nil), // 101: hyapp.wallet.v1.GetMyVipRequest - (*GetMyVipResponse)(nil), // 102: hyapp.wallet.v1.GetMyVipResponse - (*PurchaseVipRequest)(nil), // 103: hyapp.wallet.v1.PurchaseVipRequest - (*PurchaseVipResponse)(nil), // 104: hyapp.wallet.v1.PurchaseVipResponse - (*GrantVipRequest)(nil), // 105: hyapp.wallet.v1.GrantVipRequest - (*GrantVipResponse)(nil), // 106: hyapp.wallet.v1.GrantVipResponse - (*AdminVipLevelInput)(nil), // 107: hyapp.wallet.v1.AdminVipLevelInput - (*ListAdminVipLevelsRequest)(nil), // 108: hyapp.wallet.v1.ListAdminVipLevelsRequest - (*ListAdminVipLevelsResponse)(nil), // 109: hyapp.wallet.v1.ListAdminVipLevelsResponse - (*UpdateAdminVipLevelsRequest)(nil), // 110: hyapp.wallet.v1.UpdateAdminVipLevelsRequest - (*UpdateAdminVipLevelsResponse)(nil), // 111: hyapp.wallet.v1.UpdateAdminVipLevelsResponse - (*CreditTaskRewardRequest)(nil), // 112: hyapp.wallet.v1.CreditTaskRewardRequest - (*CreditTaskRewardResponse)(nil), // 113: hyapp.wallet.v1.CreditTaskRewardResponse - (*CreditLuckyGiftRewardRequest)(nil), // 114: hyapp.wallet.v1.CreditLuckyGiftRewardRequest - (*CreditLuckyGiftRewardResponse)(nil), // 115: hyapp.wallet.v1.CreditLuckyGiftRewardResponse - (*ApplyGameCoinChangeRequest)(nil), // 116: hyapp.wallet.v1.ApplyGameCoinChangeRequest - (*ApplyGameCoinChangeResponse)(nil), // 117: hyapp.wallet.v1.ApplyGameCoinChangeResponse - (*RedPacketConfig)(nil), // 118: hyapp.wallet.v1.RedPacketConfig - (*RedPacketClaim)(nil), // 119: hyapp.wallet.v1.RedPacketClaim - (*RedPacket)(nil), // 120: hyapp.wallet.v1.RedPacket - (*GetRedPacketConfigRequest)(nil), // 121: hyapp.wallet.v1.GetRedPacketConfigRequest - (*GetRedPacketConfigResponse)(nil), // 122: hyapp.wallet.v1.GetRedPacketConfigResponse - (*UpdateRedPacketConfigRequest)(nil), // 123: hyapp.wallet.v1.UpdateRedPacketConfigRequest - (*UpdateRedPacketConfigResponse)(nil), // 124: hyapp.wallet.v1.UpdateRedPacketConfigResponse - (*CreateRedPacketRequest)(nil), // 125: hyapp.wallet.v1.CreateRedPacketRequest - (*CreateRedPacketResponse)(nil), // 126: hyapp.wallet.v1.CreateRedPacketResponse - (*ClaimRedPacketRequest)(nil), // 127: hyapp.wallet.v1.ClaimRedPacketRequest - (*ClaimRedPacketResponse)(nil), // 128: hyapp.wallet.v1.ClaimRedPacketResponse - (*ListRedPacketsRequest)(nil), // 129: hyapp.wallet.v1.ListRedPacketsRequest - (*ListRedPacketsResponse)(nil), // 130: hyapp.wallet.v1.ListRedPacketsResponse - (*GetRedPacketRequest)(nil), // 131: hyapp.wallet.v1.GetRedPacketRequest - (*GetRedPacketResponse)(nil), // 132: hyapp.wallet.v1.GetRedPacketResponse - (*ExpireRedPacketsRequest)(nil), // 133: hyapp.wallet.v1.ExpireRedPacketsRequest - (*ExpireRedPacketsResponse)(nil), // 134: hyapp.wallet.v1.ExpireRedPacketsResponse + (*PurchaseResourceShopItemRequest)(nil), // 63: hyapp.wallet.v1.PurchaseResourceShopItemRequest + (*PurchaseResourceShopItemResponse)(nil), // 64: hyapp.wallet.v1.PurchaseResourceShopItemResponse + (*RechargeBill)(nil), // 65: hyapp.wallet.v1.RechargeBill + (*ListRechargeBillsRequest)(nil), // 66: hyapp.wallet.v1.ListRechargeBillsRequest + (*ListRechargeBillsResponse)(nil), // 67: hyapp.wallet.v1.ListRechargeBillsResponse + (*WalletFeatureFlags)(nil), // 68: hyapp.wallet.v1.WalletFeatureFlags + (*GetWalletOverviewRequest)(nil), // 69: hyapp.wallet.v1.GetWalletOverviewRequest + (*GetWalletOverviewResponse)(nil), // 70: hyapp.wallet.v1.GetWalletOverviewResponse + (*WalletValueSummary)(nil), // 71: hyapp.wallet.v1.WalletValueSummary + (*GetWalletValueSummaryRequest)(nil), // 72: hyapp.wallet.v1.GetWalletValueSummaryRequest + (*GetWalletValueSummaryResponse)(nil), // 73: hyapp.wallet.v1.GetWalletValueSummaryResponse + (*GiftWallItem)(nil), // 74: hyapp.wallet.v1.GiftWallItem + (*GetUserGiftWallRequest)(nil), // 75: hyapp.wallet.v1.GetUserGiftWallRequest + (*GetUserGiftWallResponse)(nil), // 76: hyapp.wallet.v1.GetUserGiftWallResponse + (*RechargeProduct)(nil), // 77: hyapp.wallet.v1.RechargeProduct + (*ListRechargeProductsRequest)(nil), // 78: hyapp.wallet.v1.ListRechargeProductsRequest + (*ListRechargeProductsResponse)(nil), // 79: hyapp.wallet.v1.ListRechargeProductsResponse + (*ConfirmGooglePaymentRequest)(nil), // 80: hyapp.wallet.v1.ConfirmGooglePaymentRequest + (*ConfirmGooglePaymentResponse)(nil), // 81: hyapp.wallet.v1.ConfirmGooglePaymentResponse + (*ListAdminRechargeProductsRequest)(nil), // 82: hyapp.wallet.v1.ListAdminRechargeProductsRequest + (*ListAdminRechargeProductsResponse)(nil), // 83: hyapp.wallet.v1.ListAdminRechargeProductsResponse + (*CreateRechargeProductRequest)(nil), // 84: hyapp.wallet.v1.CreateRechargeProductRequest + (*UpdateRechargeProductRequest)(nil), // 85: hyapp.wallet.v1.UpdateRechargeProductRequest + (*DeleteRechargeProductRequest)(nil), // 86: hyapp.wallet.v1.DeleteRechargeProductRequest + (*RechargeProductResponse)(nil), // 87: hyapp.wallet.v1.RechargeProductResponse + (*DeleteRechargeProductResponse)(nil), // 88: hyapp.wallet.v1.DeleteRechargeProductResponse + (*DiamondExchangeRule)(nil), // 89: hyapp.wallet.v1.DiamondExchangeRule + (*GetDiamondExchangeConfigRequest)(nil), // 90: hyapp.wallet.v1.GetDiamondExchangeConfigRequest + (*GetDiamondExchangeConfigResponse)(nil), // 91: hyapp.wallet.v1.GetDiamondExchangeConfigResponse + (*WalletTransaction)(nil), // 92: hyapp.wallet.v1.WalletTransaction + (*ListWalletTransactionsRequest)(nil), // 93: hyapp.wallet.v1.ListWalletTransactionsRequest + (*ListWalletTransactionsResponse)(nil), // 94: hyapp.wallet.v1.ListWalletTransactionsResponse + (*WithdrawalRequest)(nil), // 95: hyapp.wallet.v1.WithdrawalRequest + (*ApplyWithdrawalRequest)(nil), // 96: hyapp.wallet.v1.ApplyWithdrawalRequest + (*ApplyWithdrawalResponse)(nil), // 97: hyapp.wallet.v1.ApplyWithdrawalResponse + (*VipRewardItem)(nil), // 98: hyapp.wallet.v1.VipRewardItem + (*VipLevel)(nil), // 99: hyapp.wallet.v1.VipLevel + (*UserVip)(nil), // 100: hyapp.wallet.v1.UserVip + (*ListVipPackagesRequest)(nil), // 101: hyapp.wallet.v1.ListVipPackagesRequest + (*ListVipPackagesResponse)(nil), // 102: hyapp.wallet.v1.ListVipPackagesResponse + (*GetMyVipRequest)(nil), // 103: hyapp.wallet.v1.GetMyVipRequest + (*GetMyVipResponse)(nil), // 104: hyapp.wallet.v1.GetMyVipResponse + (*PurchaseVipRequest)(nil), // 105: hyapp.wallet.v1.PurchaseVipRequest + (*PurchaseVipResponse)(nil), // 106: hyapp.wallet.v1.PurchaseVipResponse + (*GrantVipRequest)(nil), // 107: hyapp.wallet.v1.GrantVipRequest + (*GrantVipResponse)(nil), // 108: hyapp.wallet.v1.GrantVipResponse + (*AdminVipLevelInput)(nil), // 109: hyapp.wallet.v1.AdminVipLevelInput + (*ListAdminVipLevelsRequest)(nil), // 110: hyapp.wallet.v1.ListAdminVipLevelsRequest + (*ListAdminVipLevelsResponse)(nil), // 111: hyapp.wallet.v1.ListAdminVipLevelsResponse + (*UpdateAdminVipLevelsRequest)(nil), // 112: hyapp.wallet.v1.UpdateAdminVipLevelsRequest + (*UpdateAdminVipLevelsResponse)(nil), // 113: hyapp.wallet.v1.UpdateAdminVipLevelsResponse + (*CreditTaskRewardRequest)(nil), // 114: hyapp.wallet.v1.CreditTaskRewardRequest + (*CreditTaskRewardResponse)(nil), // 115: hyapp.wallet.v1.CreditTaskRewardResponse + (*CreditLuckyGiftRewardRequest)(nil), // 116: hyapp.wallet.v1.CreditLuckyGiftRewardRequest + (*CreditLuckyGiftRewardResponse)(nil), // 117: hyapp.wallet.v1.CreditLuckyGiftRewardResponse + (*ApplyGameCoinChangeRequest)(nil), // 118: hyapp.wallet.v1.ApplyGameCoinChangeRequest + (*ApplyGameCoinChangeResponse)(nil), // 119: hyapp.wallet.v1.ApplyGameCoinChangeResponse + (*RedPacketConfig)(nil), // 120: hyapp.wallet.v1.RedPacketConfig + (*RedPacketClaim)(nil), // 121: hyapp.wallet.v1.RedPacketClaim + (*RedPacket)(nil), // 122: hyapp.wallet.v1.RedPacket + (*GetRedPacketConfigRequest)(nil), // 123: hyapp.wallet.v1.GetRedPacketConfigRequest + (*GetRedPacketConfigResponse)(nil), // 124: hyapp.wallet.v1.GetRedPacketConfigResponse + (*UpdateRedPacketConfigRequest)(nil), // 125: hyapp.wallet.v1.UpdateRedPacketConfigRequest + (*UpdateRedPacketConfigResponse)(nil), // 126: hyapp.wallet.v1.UpdateRedPacketConfigResponse + (*CreateRedPacketRequest)(nil), // 127: hyapp.wallet.v1.CreateRedPacketRequest + (*CreateRedPacketResponse)(nil), // 128: hyapp.wallet.v1.CreateRedPacketResponse + (*ClaimRedPacketRequest)(nil), // 129: hyapp.wallet.v1.ClaimRedPacketRequest + (*ClaimRedPacketResponse)(nil), // 130: hyapp.wallet.v1.ClaimRedPacketResponse + (*ListRedPacketsRequest)(nil), // 131: hyapp.wallet.v1.ListRedPacketsRequest + (*ListRedPacketsResponse)(nil), // 132: hyapp.wallet.v1.ListRedPacketsResponse + (*GetRedPacketRequest)(nil), // 133: hyapp.wallet.v1.GetRedPacketRequest + (*GetRedPacketResponse)(nil), // 134: hyapp.wallet.v1.GetRedPacketResponse + (*ExpireRedPacketsRequest)(nil), // 135: hyapp.wallet.v1.ExpireRedPacketsRequest + (*ExpireRedPacketsResponse)(nil), // 136: hyapp.wallet.v1.ExpireRedPacketsResponse } var file_proto_wallet_v1_wallet_proto_depIdxs = []int32{ 2, // 0: hyapp.wallet.v1.GetBalancesResponse.balances:type_name -> hyapp.wallet.v1.AssetBalance @@ -13411,161 +13599,166 @@ var file_proto_wallet_v1_wallet_proto_depIdxs = []int32{ 56, // 25: hyapp.wallet.v1.UpsertResourceShopItemsRequest.items:type_name -> hyapp.wallet.v1.ResourceShopItemInput 16, // 26: hyapp.wallet.v1.UpsertResourceShopItemsResponse.items:type_name -> hyapp.wallet.v1.ResourceShopItem 16, // 27: hyapp.wallet.v1.ResourceShopItemResponse.item:type_name -> hyapp.wallet.v1.ResourceShopItem - 63, // 28: hyapp.wallet.v1.ListRechargeBillsResponse.bills:type_name -> hyapp.wallet.v1.RechargeBill - 2, // 29: hyapp.wallet.v1.GetWalletOverviewResponse.balances:type_name -> hyapp.wallet.v1.AssetBalance - 66, // 30: hyapp.wallet.v1.GetWalletOverviewResponse.feature_flags:type_name -> hyapp.wallet.v1.WalletFeatureFlags - 69, // 31: hyapp.wallet.v1.GetWalletValueSummaryResponse.summary:type_name -> hyapp.wallet.v1.WalletValueSummary - 11, // 32: hyapp.wallet.v1.GiftWallItem.resource:type_name -> hyapp.wallet.v1.Resource - 72, // 33: hyapp.wallet.v1.GetUserGiftWallResponse.items:type_name -> hyapp.wallet.v1.GiftWallItem - 75, // 34: hyapp.wallet.v1.ListRechargeProductsResponse.products:type_name -> hyapp.wallet.v1.RechargeProduct - 2, // 35: hyapp.wallet.v1.ConfirmGooglePaymentResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance - 75, // 36: hyapp.wallet.v1.ListAdminRechargeProductsResponse.products:type_name -> hyapp.wallet.v1.RechargeProduct - 75, // 37: hyapp.wallet.v1.RechargeProductResponse.product:type_name -> hyapp.wallet.v1.RechargeProduct - 87, // 38: hyapp.wallet.v1.GetDiamondExchangeConfigResponse.rules:type_name -> hyapp.wallet.v1.DiamondExchangeRule - 90, // 39: hyapp.wallet.v1.ListWalletTransactionsResponse.transactions:type_name -> hyapp.wallet.v1.WalletTransaction - 93, // 40: hyapp.wallet.v1.ApplyWithdrawalResponse.withdrawal:type_name -> hyapp.wallet.v1.WithdrawalRequest - 2, // 41: hyapp.wallet.v1.ApplyWithdrawalResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance - 96, // 42: hyapp.wallet.v1.VipLevel.reward_items:type_name -> hyapp.wallet.v1.VipRewardItem - 98, // 43: hyapp.wallet.v1.ListVipPackagesResponse.current_vip:type_name -> hyapp.wallet.v1.UserVip - 97, // 44: hyapp.wallet.v1.ListVipPackagesResponse.packages:type_name -> hyapp.wallet.v1.VipLevel - 98, // 45: hyapp.wallet.v1.GetMyVipResponse.vip:type_name -> hyapp.wallet.v1.UserVip - 98, // 46: hyapp.wallet.v1.PurchaseVipResponse.vip:type_name -> hyapp.wallet.v1.UserVip - 96, // 47: hyapp.wallet.v1.PurchaseVipResponse.reward_items:type_name -> hyapp.wallet.v1.VipRewardItem - 98, // 48: hyapp.wallet.v1.GrantVipResponse.vip:type_name -> hyapp.wallet.v1.UserVip - 96, // 49: hyapp.wallet.v1.GrantVipResponse.reward_items:type_name -> hyapp.wallet.v1.VipRewardItem - 97, // 50: hyapp.wallet.v1.ListAdminVipLevelsResponse.levels:type_name -> hyapp.wallet.v1.VipLevel - 107, // 51: hyapp.wallet.v1.UpdateAdminVipLevelsRequest.levels:type_name -> hyapp.wallet.v1.AdminVipLevelInput - 97, // 52: hyapp.wallet.v1.UpdateAdminVipLevelsResponse.levels:type_name -> hyapp.wallet.v1.VipLevel - 2, // 53: hyapp.wallet.v1.CreditTaskRewardResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance - 2, // 54: hyapp.wallet.v1.CreditLuckyGiftRewardResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance - 119, // 55: hyapp.wallet.v1.RedPacket.claims:type_name -> hyapp.wallet.v1.RedPacketClaim - 118, // 56: hyapp.wallet.v1.GetRedPacketConfigResponse.config:type_name -> hyapp.wallet.v1.RedPacketConfig - 118, // 57: hyapp.wallet.v1.UpdateRedPacketConfigResponse.config:type_name -> hyapp.wallet.v1.RedPacketConfig - 120, // 58: hyapp.wallet.v1.CreateRedPacketResponse.packet:type_name -> hyapp.wallet.v1.RedPacket - 119, // 59: hyapp.wallet.v1.ClaimRedPacketResponse.claim:type_name -> hyapp.wallet.v1.RedPacketClaim - 120, // 60: hyapp.wallet.v1.ListRedPacketsResponse.packets:type_name -> hyapp.wallet.v1.RedPacket - 120, // 61: hyapp.wallet.v1.GetRedPacketResponse.packet:type_name -> hyapp.wallet.v1.RedPacket - 0, // 62: hyapp.wallet.v1.WalletService.DebitGift:input_type -> hyapp.wallet.v1.DebitGiftRequest - 3, // 63: hyapp.wallet.v1.WalletService.GetBalances:input_type -> hyapp.wallet.v1.GetBalancesRequest - 5, // 64: hyapp.wallet.v1.WalletService.AdminCreditAsset:input_type -> hyapp.wallet.v1.AdminCreditAssetRequest - 7, // 65: hyapp.wallet.v1.WalletService.AdminCreditCoinSellerStock:input_type -> hyapp.wallet.v1.AdminCreditCoinSellerStockRequest - 9, // 66: hyapp.wallet.v1.WalletService.TransferCoinFromSeller:input_type -> hyapp.wallet.v1.TransferCoinFromSellerRequest - 21, // 67: hyapp.wallet.v1.WalletService.ListResources:input_type -> hyapp.wallet.v1.ListResourcesRequest - 23, // 68: hyapp.wallet.v1.WalletService.GetResource:input_type -> hyapp.wallet.v1.GetResourceRequest - 25, // 69: hyapp.wallet.v1.WalletService.CreateResource:input_type -> hyapp.wallet.v1.CreateResourceRequest - 26, // 70: hyapp.wallet.v1.WalletService.UpdateResource:input_type -> hyapp.wallet.v1.UpdateResourceRequest - 27, // 71: hyapp.wallet.v1.WalletService.SetResourceStatus:input_type -> hyapp.wallet.v1.SetResourceStatusRequest - 29, // 72: hyapp.wallet.v1.WalletService.ListResourceGroups:input_type -> hyapp.wallet.v1.ListResourceGroupsRequest - 31, // 73: hyapp.wallet.v1.WalletService.GetResourceGroup:input_type -> hyapp.wallet.v1.GetResourceGroupRequest - 33, // 74: hyapp.wallet.v1.WalletService.CreateResourceGroup:input_type -> hyapp.wallet.v1.CreateResourceGroupRequest - 34, // 75: hyapp.wallet.v1.WalletService.UpdateResourceGroup:input_type -> hyapp.wallet.v1.UpdateResourceGroupRequest - 35, // 76: hyapp.wallet.v1.WalletService.SetResourceGroupStatus:input_type -> hyapp.wallet.v1.SetResourceGroupStatusRequest - 37, // 77: hyapp.wallet.v1.WalletService.ListGiftConfigs:input_type -> hyapp.wallet.v1.ListGiftConfigsRequest - 39, // 78: hyapp.wallet.v1.WalletService.ListGiftTypeConfigs:input_type -> hyapp.wallet.v1.ListGiftTypeConfigsRequest - 43, // 79: hyapp.wallet.v1.WalletService.CreateGiftConfig:input_type -> hyapp.wallet.v1.CreateGiftConfigRequest - 44, // 80: hyapp.wallet.v1.WalletService.UpdateGiftConfig:input_type -> hyapp.wallet.v1.UpdateGiftConfigRequest - 45, // 81: hyapp.wallet.v1.WalletService.SetGiftConfigStatus:input_type -> hyapp.wallet.v1.SetGiftConfigStatusRequest - 41, // 82: hyapp.wallet.v1.WalletService.UpsertGiftTypeConfig:input_type -> hyapp.wallet.v1.UpsertGiftTypeConfigRequest - 47, // 83: hyapp.wallet.v1.WalletService.GrantResource:input_type -> hyapp.wallet.v1.GrantResourceRequest - 48, // 84: hyapp.wallet.v1.WalletService.GrantResourceGroup:input_type -> hyapp.wallet.v1.GrantResourceGroupRequest - 50, // 85: hyapp.wallet.v1.WalletService.ListUserResources:input_type -> hyapp.wallet.v1.ListUserResourcesRequest - 52, // 86: hyapp.wallet.v1.WalletService.EquipUserResource:input_type -> hyapp.wallet.v1.EquipUserResourceRequest - 54, // 87: hyapp.wallet.v1.WalletService.ListResourceGrants:input_type -> hyapp.wallet.v1.ListResourceGrantsRequest - 57, // 88: hyapp.wallet.v1.WalletService.ListResourceShopItems:input_type -> hyapp.wallet.v1.ListResourceShopItemsRequest - 59, // 89: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:input_type -> hyapp.wallet.v1.UpsertResourceShopItemsRequest - 61, // 90: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:input_type -> hyapp.wallet.v1.SetResourceShopItemStatusRequest - 64, // 91: hyapp.wallet.v1.WalletService.ListRechargeBills:input_type -> hyapp.wallet.v1.ListRechargeBillsRequest - 67, // 92: hyapp.wallet.v1.WalletService.GetWalletOverview:input_type -> hyapp.wallet.v1.GetWalletOverviewRequest - 70, // 93: hyapp.wallet.v1.WalletService.GetWalletValueSummary:input_type -> hyapp.wallet.v1.GetWalletValueSummaryRequest - 73, // 94: hyapp.wallet.v1.WalletService.GetUserGiftWall:input_type -> hyapp.wallet.v1.GetUserGiftWallRequest - 76, // 95: hyapp.wallet.v1.WalletService.ListRechargeProducts:input_type -> hyapp.wallet.v1.ListRechargeProductsRequest - 78, // 96: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:input_type -> hyapp.wallet.v1.ConfirmGooglePaymentRequest - 80, // 97: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:input_type -> hyapp.wallet.v1.ListAdminRechargeProductsRequest - 82, // 98: hyapp.wallet.v1.WalletService.CreateRechargeProduct:input_type -> hyapp.wallet.v1.CreateRechargeProductRequest - 83, // 99: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:input_type -> hyapp.wallet.v1.UpdateRechargeProductRequest - 84, // 100: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:input_type -> hyapp.wallet.v1.DeleteRechargeProductRequest - 88, // 101: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:input_type -> hyapp.wallet.v1.GetDiamondExchangeConfigRequest - 91, // 102: hyapp.wallet.v1.WalletService.ListWalletTransactions:input_type -> hyapp.wallet.v1.ListWalletTransactionsRequest - 94, // 103: hyapp.wallet.v1.WalletService.ApplyWithdrawal:input_type -> hyapp.wallet.v1.ApplyWithdrawalRequest - 99, // 104: hyapp.wallet.v1.WalletService.ListVipPackages:input_type -> hyapp.wallet.v1.ListVipPackagesRequest - 101, // 105: hyapp.wallet.v1.WalletService.GetMyVip:input_type -> hyapp.wallet.v1.GetMyVipRequest - 103, // 106: hyapp.wallet.v1.WalletService.PurchaseVip:input_type -> hyapp.wallet.v1.PurchaseVipRequest - 105, // 107: hyapp.wallet.v1.WalletService.GrantVip:input_type -> hyapp.wallet.v1.GrantVipRequest - 108, // 108: hyapp.wallet.v1.WalletService.ListAdminVipLevels:input_type -> hyapp.wallet.v1.ListAdminVipLevelsRequest - 110, // 109: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:input_type -> hyapp.wallet.v1.UpdateAdminVipLevelsRequest - 112, // 110: hyapp.wallet.v1.WalletService.CreditTaskReward:input_type -> hyapp.wallet.v1.CreditTaskRewardRequest - 114, // 111: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:input_type -> hyapp.wallet.v1.CreditLuckyGiftRewardRequest - 116, // 112: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:input_type -> hyapp.wallet.v1.ApplyGameCoinChangeRequest - 121, // 113: hyapp.wallet.v1.WalletService.GetRedPacketConfig:input_type -> hyapp.wallet.v1.GetRedPacketConfigRequest - 123, // 114: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:input_type -> hyapp.wallet.v1.UpdateRedPacketConfigRequest - 125, // 115: hyapp.wallet.v1.WalletService.CreateRedPacket:input_type -> hyapp.wallet.v1.CreateRedPacketRequest - 127, // 116: hyapp.wallet.v1.WalletService.ClaimRedPacket:input_type -> hyapp.wallet.v1.ClaimRedPacketRequest - 129, // 117: hyapp.wallet.v1.WalletService.ListRedPackets:input_type -> hyapp.wallet.v1.ListRedPacketsRequest - 131, // 118: hyapp.wallet.v1.WalletService.GetRedPacket:input_type -> hyapp.wallet.v1.GetRedPacketRequest - 133, // 119: hyapp.wallet.v1.WalletService.ExpireRedPackets:input_type -> hyapp.wallet.v1.ExpireRedPacketsRequest - 1, // 120: hyapp.wallet.v1.WalletService.DebitGift:output_type -> hyapp.wallet.v1.DebitGiftResponse - 4, // 121: hyapp.wallet.v1.WalletService.GetBalances:output_type -> hyapp.wallet.v1.GetBalancesResponse - 6, // 122: hyapp.wallet.v1.WalletService.AdminCreditAsset:output_type -> hyapp.wallet.v1.AdminCreditAssetResponse - 8, // 123: hyapp.wallet.v1.WalletService.AdminCreditCoinSellerStock:output_type -> hyapp.wallet.v1.AdminCreditCoinSellerStockResponse - 10, // 124: hyapp.wallet.v1.WalletService.TransferCoinFromSeller:output_type -> hyapp.wallet.v1.TransferCoinFromSellerResponse - 22, // 125: hyapp.wallet.v1.WalletService.ListResources:output_type -> hyapp.wallet.v1.ListResourcesResponse - 24, // 126: hyapp.wallet.v1.WalletService.GetResource:output_type -> hyapp.wallet.v1.GetResourceResponse - 28, // 127: hyapp.wallet.v1.WalletService.CreateResource:output_type -> hyapp.wallet.v1.ResourceResponse - 28, // 128: hyapp.wallet.v1.WalletService.UpdateResource:output_type -> hyapp.wallet.v1.ResourceResponse - 28, // 129: hyapp.wallet.v1.WalletService.SetResourceStatus:output_type -> hyapp.wallet.v1.ResourceResponse - 30, // 130: hyapp.wallet.v1.WalletService.ListResourceGroups:output_type -> hyapp.wallet.v1.ListResourceGroupsResponse - 32, // 131: hyapp.wallet.v1.WalletService.GetResourceGroup:output_type -> hyapp.wallet.v1.GetResourceGroupResponse - 36, // 132: hyapp.wallet.v1.WalletService.CreateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse - 36, // 133: hyapp.wallet.v1.WalletService.UpdateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse - 36, // 134: hyapp.wallet.v1.WalletService.SetResourceGroupStatus:output_type -> hyapp.wallet.v1.ResourceGroupResponse - 38, // 135: hyapp.wallet.v1.WalletService.ListGiftConfigs:output_type -> hyapp.wallet.v1.ListGiftConfigsResponse - 40, // 136: hyapp.wallet.v1.WalletService.ListGiftTypeConfigs:output_type -> hyapp.wallet.v1.ListGiftTypeConfigsResponse - 46, // 137: hyapp.wallet.v1.WalletService.CreateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse - 46, // 138: hyapp.wallet.v1.WalletService.UpdateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse - 46, // 139: hyapp.wallet.v1.WalletService.SetGiftConfigStatus:output_type -> hyapp.wallet.v1.GiftConfigResponse - 42, // 140: hyapp.wallet.v1.WalletService.UpsertGiftTypeConfig:output_type -> hyapp.wallet.v1.GiftTypeConfigResponse - 49, // 141: hyapp.wallet.v1.WalletService.GrantResource:output_type -> hyapp.wallet.v1.ResourceGrantResponse - 49, // 142: hyapp.wallet.v1.WalletService.GrantResourceGroup:output_type -> hyapp.wallet.v1.ResourceGrantResponse - 51, // 143: hyapp.wallet.v1.WalletService.ListUserResources:output_type -> hyapp.wallet.v1.ListUserResourcesResponse - 53, // 144: hyapp.wallet.v1.WalletService.EquipUserResource:output_type -> hyapp.wallet.v1.EquipUserResourceResponse - 55, // 145: hyapp.wallet.v1.WalletService.ListResourceGrants:output_type -> hyapp.wallet.v1.ListResourceGrantsResponse - 58, // 146: hyapp.wallet.v1.WalletService.ListResourceShopItems:output_type -> hyapp.wallet.v1.ListResourceShopItemsResponse - 60, // 147: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:output_type -> hyapp.wallet.v1.UpsertResourceShopItemsResponse - 62, // 148: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:output_type -> hyapp.wallet.v1.ResourceShopItemResponse - 65, // 149: hyapp.wallet.v1.WalletService.ListRechargeBills:output_type -> hyapp.wallet.v1.ListRechargeBillsResponse - 68, // 150: hyapp.wallet.v1.WalletService.GetWalletOverview:output_type -> hyapp.wallet.v1.GetWalletOverviewResponse - 71, // 151: hyapp.wallet.v1.WalletService.GetWalletValueSummary:output_type -> hyapp.wallet.v1.GetWalletValueSummaryResponse - 74, // 152: hyapp.wallet.v1.WalletService.GetUserGiftWall:output_type -> hyapp.wallet.v1.GetUserGiftWallResponse - 77, // 153: hyapp.wallet.v1.WalletService.ListRechargeProducts:output_type -> hyapp.wallet.v1.ListRechargeProductsResponse - 79, // 154: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:output_type -> hyapp.wallet.v1.ConfirmGooglePaymentResponse - 81, // 155: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:output_type -> hyapp.wallet.v1.ListAdminRechargeProductsResponse - 85, // 156: hyapp.wallet.v1.WalletService.CreateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse - 85, // 157: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse - 86, // 158: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:output_type -> hyapp.wallet.v1.DeleteRechargeProductResponse - 89, // 159: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:output_type -> hyapp.wallet.v1.GetDiamondExchangeConfigResponse - 92, // 160: hyapp.wallet.v1.WalletService.ListWalletTransactions:output_type -> hyapp.wallet.v1.ListWalletTransactionsResponse - 95, // 161: hyapp.wallet.v1.WalletService.ApplyWithdrawal:output_type -> hyapp.wallet.v1.ApplyWithdrawalResponse - 100, // 162: hyapp.wallet.v1.WalletService.ListVipPackages:output_type -> hyapp.wallet.v1.ListVipPackagesResponse - 102, // 163: hyapp.wallet.v1.WalletService.GetMyVip:output_type -> hyapp.wallet.v1.GetMyVipResponse - 104, // 164: hyapp.wallet.v1.WalletService.PurchaseVip:output_type -> hyapp.wallet.v1.PurchaseVipResponse - 106, // 165: hyapp.wallet.v1.WalletService.GrantVip:output_type -> hyapp.wallet.v1.GrantVipResponse - 109, // 166: hyapp.wallet.v1.WalletService.ListAdminVipLevels:output_type -> hyapp.wallet.v1.ListAdminVipLevelsResponse - 111, // 167: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:output_type -> hyapp.wallet.v1.UpdateAdminVipLevelsResponse - 113, // 168: hyapp.wallet.v1.WalletService.CreditTaskReward:output_type -> hyapp.wallet.v1.CreditTaskRewardResponse - 115, // 169: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:output_type -> hyapp.wallet.v1.CreditLuckyGiftRewardResponse - 117, // 170: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:output_type -> hyapp.wallet.v1.ApplyGameCoinChangeResponse - 122, // 171: hyapp.wallet.v1.WalletService.GetRedPacketConfig:output_type -> hyapp.wallet.v1.GetRedPacketConfigResponse - 124, // 172: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:output_type -> hyapp.wallet.v1.UpdateRedPacketConfigResponse - 126, // 173: hyapp.wallet.v1.WalletService.CreateRedPacket:output_type -> hyapp.wallet.v1.CreateRedPacketResponse - 128, // 174: hyapp.wallet.v1.WalletService.ClaimRedPacket:output_type -> hyapp.wallet.v1.ClaimRedPacketResponse - 130, // 175: hyapp.wallet.v1.WalletService.ListRedPackets:output_type -> hyapp.wallet.v1.ListRedPacketsResponse - 132, // 176: hyapp.wallet.v1.WalletService.GetRedPacket:output_type -> hyapp.wallet.v1.GetRedPacketResponse - 134, // 177: hyapp.wallet.v1.WalletService.ExpireRedPackets:output_type -> hyapp.wallet.v1.ExpireRedPacketsResponse - 120, // [120:178] is the sub-list for method output_type - 62, // [62:120] is the sub-list for method input_type - 62, // [62:62] is the sub-list for extension type_name - 62, // [62:62] is the sub-list for extension extendee - 0, // [0:62] is the sub-list for field type_name + 16, // 28: hyapp.wallet.v1.PurchaseResourceShopItemResponse.shop_item:type_name -> hyapp.wallet.v1.ResourceShopItem + 17, // 29: hyapp.wallet.v1.PurchaseResourceShopItemResponse.resource:type_name -> hyapp.wallet.v1.UserResourceEntitlement + 2, // 30: hyapp.wallet.v1.PurchaseResourceShopItemResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance + 65, // 31: hyapp.wallet.v1.ListRechargeBillsResponse.bills:type_name -> hyapp.wallet.v1.RechargeBill + 2, // 32: hyapp.wallet.v1.GetWalletOverviewResponse.balances:type_name -> hyapp.wallet.v1.AssetBalance + 68, // 33: hyapp.wallet.v1.GetWalletOverviewResponse.feature_flags:type_name -> hyapp.wallet.v1.WalletFeatureFlags + 71, // 34: hyapp.wallet.v1.GetWalletValueSummaryResponse.summary:type_name -> hyapp.wallet.v1.WalletValueSummary + 11, // 35: hyapp.wallet.v1.GiftWallItem.resource:type_name -> hyapp.wallet.v1.Resource + 74, // 36: hyapp.wallet.v1.GetUserGiftWallResponse.items:type_name -> hyapp.wallet.v1.GiftWallItem + 77, // 37: hyapp.wallet.v1.ListRechargeProductsResponse.products:type_name -> hyapp.wallet.v1.RechargeProduct + 2, // 38: hyapp.wallet.v1.ConfirmGooglePaymentResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance + 77, // 39: hyapp.wallet.v1.ListAdminRechargeProductsResponse.products:type_name -> hyapp.wallet.v1.RechargeProduct + 77, // 40: hyapp.wallet.v1.RechargeProductResponse.product:type_name -> hyapp.wallet.v1.RechargeProduct + 89, // 41: hyapp.wallet.v1.GetDiamondExchangeConfigResponse.rules:type_name -> hyapp.wallet.v1.DiamondExchangeRule + 92, // 42: hyapp.wallet.v1.ListWalletTransactionsResponse.transactions:type_name -> hyapp.wallet.v1.WalletTransaction + 95, // 43: hyapp.wallet.v1.ApplyWithdrawalResponse.withdrawal:type_name -> hyapp.wallet.v1.WithdrawalRequest + 2, // 44: hyapp.wallet.v1.ApplyWithdrawalResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance + 98, // 45: hyapp.wallet.v1.VipLevel.reward_items:type_name -> hyapp.wallet.v1.VipRewardItem + 100, // 46: hyapp.wallet.v1.ListVipPackagesResponse.current_vip:type_name -> hyapp.wallet.v1.UserVip + 99, // 47: hyapp.wallet.v1.ListVipPackagesResponse.packages:type_name -> hyapp.wallet.v1.VipLevel + 100, // 48: hyapp.wallet.v1.GetMyVipResponse.vip:type_name -> hyapp.wallet.v1.UserVip + 100, // 49: hyapp.wallet.v1.PurchaseVipResponse.vip:type_name -> hyapp.wallet.v1.UserVip + 98, // 50: hyapp.wallet.v1.PurchaseVipResponse.reward_items:type_name -> hyapp.wallet.v1.VipRewardItem + 100, // 51: hyapp.wallet.v1.GrantVipResponse.vip:type_name -> hyapp.wallet.v1.UserVip + 98, // 52: hyapp.wallet.v1.GrantVipResponse.reward_items:type_name -> hyapp.wallet.v1.VipRewardItem + 99, // 53: hyapp.wallet.v1.ListAdminVipLevelsResponse.levels:type_name -> hyapp.wallet.v1.VipLevel + 109, // 54: hyapp.wallet.v1.UpdateAdminVipLevelsRequest.levels:type_name -> hyapp.wallet.v1.AdminVipLevelInput + 99, // 55: hyapp.wallet.v1.UpdateAdminVipLevelsResponse.levels:type_name -> hyapp.wallet.v1.VipLevel + 2, // 56: hyapp.wallet.v1.CreditTaskRewardResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance + 2, // 57: hyapp.wallet.v1.CreditLuckyGiftRewardResponse.balance:type_name -> hyapp.wallet.v1.AssetBalance + 121, // 58: hyapp.wallet.v1.RedPacket.claims:type_name -> hyapp.wallet.v1.RedPacketClaim + 120, // 59: hyapp.wallet.v1.GetRedPacketConfigResponse.config:type_name -> hyapp.wallet.v1.RedPacketConfig + 120, // 60: hyapp.wallet.v1.UpdateRedPacketConfigResponse.config:type_name -> hyapp.wallet.v1.RedPacketConfig + 122, // 61: hyapp.wallet.v1.CreateRedPacketResponse.packet:type_name -> hyapp.wallet.v1.RedPacket + 121, // 62: hyapp.wallet.v1.ClaimRedPacketResponse.claim:type_name -> hyapp.wallet.v1.RedPacketClaim + 122, // 63: hyapp.wallet.v1.ListRedPacketsResponse.packets:type_name -> hyapp.wallet.v1.RedPacket + 122, // 64: hyapp.wallet.v1.GetRedPacketResponse.packet:type_name -> hyapp.wallet.v1.RedPacket + 0, // 65: hyapp.wallet.v1.WalletService.DebitGift:input_type -> hyapp.wallet.v1.DebitGiftRequest + 3, // 66: hyapp.wallet.v1.WalletService.GetBalances:input_type -> hyapp.wallet.v1.GetBalancesRequest + 5, // 67: hyapp.wallet.v1.WalletService.AdminCreditAsset:input_type -> hyapp.wallet.v1.AdminCreditAssetRequest + 7, // 68: hyapp.wallet.v1.WalletService.AdminCreditCoinSellerStock:input_type -> hyapp.wallet.v1.AdminCreditCoinSellerStockRequest + 9, // 69: hyapp.wallet.v1.WalletService.TransferCoinFromSeller:input_type -> hyapp.wallet.v1.TransferCoinFromSellerRequest + 21, // 70: hyapp.wallet.v1.WalletService.ListResources:input_type -> hyapp.wallet.v1.ListResourcesRequest + 23, // 71: hyapp.wallet.v1.WalletService.GetResource:input_type -> hyapp.wallet.v1.GetResourceRequest + 25, // 72: hyapp.wallet.v1.WalletService.CreateResource:input_type -> hyapp.wallet.v1.CreateResourceRequest + 26, // 73: hyapp.wallet.v1.WalletService.UpdateResource:input_type -> hyapp.wallet.v1.UpdateResourceRequest + 27, // 74: hyapp.wallet.v1.WalletService.SetResourceStatus:input_type -> hyapp.wallet.v1.SetResourceStatusRequest + 29, // 75: hyapp.wallet.v1.WalletService.ListResourceGroups:input_type -> hyapp.wallet.v1.ListResourceGroupsRequest + 31, // 76: hyapp.wallet.v1.WalletService.GetResourceGroup:input_type -> hyapp.wallet.v1.GetResourceGroupRequest + 33, // 77: hyapp.wallet.v1.WalletService.CreateResourceGroup:input_type -> hyapp.wallet.v1.CreateResourceGroupRequest + 34, // 78: hyapp.wallet.v1.WalletService.UpdateResourceGroup:input_type -> hyapp.wallet.v1.UpdateResourceGroupRequest + 35, // 79: hyapp.wallet.v1.WalletService.SetResourceGroupStatus:input_type -> hyapp.wallet.v1.SetResourceGroupStatusRequest + 37, // 80: hyapp.wallet.v1.WalletService.ListGiftConfigs:input_type -> hyapp.wallet.v1.ListGiftConfigsRequest + 39, // 81: hyapp.wallet.v1.WalletService.ListGiftTypeConfigs:input_type -> hyapp.wallet.v1.ListGiftTypeConfigsRequest + 43, // 82: hyapp.wallet.v1.WalletService.CreateGiftConfig:input_type -> hyapp.wallet.v1.CreateGiftConfigRequest + 44, // 83: hyapp.wallet.v1.WalletService.UpdateGiftConfig:input_type -> hyapp.wallet.v1.UpdateGiftConfigRequest + 45, // 84: hyapp.wallet.v1.WalletService.SetGiftConfigStatus:input_type -> hyapp.wallet.v1.SetGiftConfigStatusRequest + 41, // 85: hyapp.wallet.v1.WalletService.UpsertGiftTypeConfig:input_type -> hyapp.wallet.v1.UpsertGiftTypeConfigRequest + 47, // 86: hyapp.wallet.v1.WalletService.GrantResource:input_type -> hyapp.wallet.v1.GrantResourceRequest + 48, // 87: hyapp.wallet.v1.WalletService.GrantResourceGroup:input_type -> hyapp.wallet.v1.GrantResourceGroupRequest + 50, // 88: hyapp.wallet.v1.WalletService.ListUserResources:input_type -> hyapp.wallet.v1.ListUserResourcesRequest + 52, // 89: hyapp.wallet.v1.WalletService.EquipUserResource:input_type -> hyapp.wallet.v1.EquipUserResourceRequest + 54, // 90: hyapp.wallet.v1.WalletService.ListResourceGrants:input_type -> hyapp.wallet.v1.ListResourceGrantsRequest + 57, // 91: hyapp.wallet.v1.WalletService.ListResourceShopItems:input_type -> hyapp.wallet.v1.ListResourceShopItemsRequest + 59, // 92: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:input_type -> hyapp.wallet.v1.UpsertResourceShopItemsRequest + 61, // 93: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:input_type -> hyapp.wallet.v1.SetResourceShopItemStatusRequest + 63, // 94: hyapp.wallet.v1.WalletService.PurchaseResourceShopItem:input_type -> hyapp.wallet.v1.PurchaseResourceShopItemRequest + 66, // 95: hyapp.wallet.v1.WalletService.ListRechargeBills:input_type -> hyapp.wallet.v1.ListRechargeBillsRequest + 69, // 96: hyapp.wallet.v1.WalletService.GetWalletOverview:input_type -> hyapp.wallet.v1.GetWalletOverviewRequest + 72, // 97: hyapp.wallet.v1.WalletService.GetWalletValueSummary:input_type -> hyapp.wallet.v1.GetWalletValueSummaryRequest + 75, // 98: hyapp.wallet.v1.WalletService.GetUserGiftWall:input_type -> hyapp.wallet.v1.GetUserGiftWallRequest + 78, // 99: hyapp.wallet.v1.WalletService.ListRechargeProducts:input_type -> hyapp.wallet.v1.ListRechargeProductsRequest + 80, // 100: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:input_type -> hyapp.wallet.v1.ConfirmGooglePaymentRequest + 82, // 101: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:input_type -> hyapp.wallet.v1.ListAdminRechargeProductsRequest + 84, // 102: hyapp.wallet.v1.WalletService.CreateRechargeProduct:input_type -> hyapp.wallet.v1.CreateRechargeProductRequest + 85, // 103: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:input_type -> hyapp.wallet.v1.UpdateRechargeProductRequest + 86, // 104: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:input_type -> hyapp.wallet.v1.DeleteRechargeProductRequest + 90, // 105: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:input_type -> hyapp.wallet.v1.GetDiamondExchangeConfigRequest + 93, // 106: hyapp.wallet.v1.WalletService.ListWalletTransactions:input_type -> hyapp.wallet.v1.ListWalletTransactionsRequest + 96, // 107: hyapp.wallet.v1.WalletService.ApplyWithdrawal:input_type -> hyapp.wallet.v1.ApplyWithdrawalRequest + 101, // 108: hyapp.wallet.v1.WalletService.ListVipPackages:input_type -> hyapp.wallet.v1.ListVipPackagesRequest + 103, // 109: hyapp.wallet.v1.WalletService.GetMyVip:input_type -> hyapp.wallet.v1.GetMyVipRequest + 105, // 110: hyapp.wallet.v1.WalletService.PurchaseVip:input_type -> hyapp.wallet.v1.PurchaseVipRequest + 107, // 111: hyapp.wallet.v1.WalletService.GrantVip:input_type -> hyapp.wallet.v1.GrantVipRequest + 110, // 112: hyapp.wallet.v1.WalletService.ListAdminVipLevels:input_type -> hyapp.wallet.v1.ListAdminVipLevelsRequest + 112, // 113: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:input_type -> hyapp.wallet.v1.UpdateAdminVipLevelsRequest + 114, // 114: hyapp.wallet.v1.WalletService.CreditTaskReward:input_type -> hyapp.wallet.v1.CreditTaskRewardRequest + 116, // 115: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:input_type -> hyapp.wallet.v1.CreditLuckyGiftRewardRequest + 118, // 116: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:input_type -> hyapp.wallet.v1.ApplyGameCoinChangeRequest + 123, // 117: hyapp.wallet.v1.WalletService.GetRedPacketConfig:input_type -> hyapp.wallet.v1.GetRedPacketConfigRequest + 125, // 118: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:input_type -> hyapp.wallet.v1.UpdateRedPacketConfigRequest + 127, // 119: hyapp.wallet.v1.WalletService.CreateRedPacket:input_type -> hyapp.wallet.v1.CreateRedPacketRequest + 129, // 120: hyapp.wallet.v1.WalletService.ClaimRedPacket:input_type -> hyapp.wallet.v1.ClaimRedPacketRequest + 131, // 121: hyapp.wallet.v1.WalletService.ListRedPackets:input_type -> hyapp.wallet.v1.ListRedPacketsRequest + 133, // 122: hyapp.wallet.v1.WalletService.GetRedPacket:input_type -> hyapp.wallet.v1.GetRedPacketRequest + 135, // 123: hyapp.wallet.v1.WalletService.ExpireRedPackets:input_type -> hyapp.wallet.v1.ExpireRedPacketsRequest + 1, // 124: hyapp.wallet.v1.WalletService.DebitGift:output_type -> hyapp.wallet.v1.DebitGiftResponse + 4, // 125: hyapp.wallet.v1.WalletService.GetBalances:output_type -> hyapp.wallet.v1.GetBalancesResponse + 6, // 126: hyapp.wallet.v1.WalletService.AdminCreditAsset:output_type -> hyapp.wallet.v1.AdminCreditAssetResponse + 8, // 127: hyapp.wallet.v1.WalletService.AdminCreditCoinSellerStock:output_type -> hyapp.wallet.v1.AdminCreditCoinSellerStockResponse + 10, // 128: hyapp.wallet.v1.WalletService.TransferCoinFromSeller:output_type -> hyapp.wallet.v1.TransferCoinFromSellerResponse + 22, // 129: hyapp.wallet.v1.WalletService.ListResources:output_type -> hyapp.wallet.v1.ListResourcesResponse + 24, // 130: hyapp.wallet.v1.WalletService.GetResource:output_type -> hyapp.wallet.v1.GetResourceResponse + 28, // 131: hyapp.wallet.v1.WalletService.CreateResource:output_type -> hyapp.wallet.v1.ResourceResponse + 28, // 132: hyapp.wallet.v1.WalletService.UpdateResource:output_type -> hyapp.wallet.v1.ResourceResponse + 28, // 133: hyapp.wallet.v1.WalletService.SetResourceStatus:output_type -> hyapp.wallet.v1.ResourceResponse + 30, // 134: hyapp.wallet.v1.WalletService.ListResourceGroups:output_type -> hyapp.wallet.v1.ListResourceGroupsResponse + 32, // 135: hyapp.wallet.v1.WalletService.GetResourceGroup:output_type -> hyapp.wallet.v1.GetResourceGroupResponse + 36, // 136: hyapp.wallet.v1.WalletService.CreateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse + 36, // 137: hyapp.wallet.v1.WalletService.UpdateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse + 36, // 138: hyapp.wallet.v1.WalletService.SetResourceGroupStatus:output_type -> hyapp.wallet.v1.ResourceGroupResponse + 38, // 139: hyapp.wallet.v1.WalletService.ListGiftConfigs:output_type -> hyapp.wallet.v1.ListGiftConfigsResponse + 40, // 140: hyapp.wallet.v1.WalletService.ListGiftTypeConfigs:output_type -> hyapp.wallet.v1.ListGiftTypeConfigsResponse + 46, // 141: hyapp.wallet.v1.WalletService.CreateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse + 46, // 142: hyapp.wallet.v1.WalletService.UpdateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse + 46, // 143: hyapp.wallet.v1.WalletService.SetGiftConfigStatus:output_type -> hyapp.wallet.v1.GiftConfigResponse + 42, // 144: hyapp.wallet.v1.WalletService.UpsertGiftTypeConfig:output_type -> hyapp.wallet.v1.GiftTypeConfigResponse + 49, // 145: hyapp.wallet.v1.WalletService.GrantResource:output_type -> hyapp.wallet.v1.ResourceGrantResponse + 49, // 146: hyapp.wallet.v1.WalletService.GrantResourceGroup:output_type -> hyapp.wallet.v1.ResourceGrantResponse + 51, // 147: hyapp.wallet.v1.WalletService.ListUserResources:output_type -> hyapp.wallet.v1.ListUserResourcesResponse + 53, // 148: hyapp.wallet.v1.WalletService.EquipUserResource:output_type -> hyapp.wallet.v1.EquipUserResourceResponse + 55, // 149: hyapp.wallet.v1.WalletService.ListResourceGrants:output_type -> hyapp.wallet.v1.ListResourceGrantsResponse + 58, // 150: hyapp.wallet.v1.WalletService.ListResourceShopItems:output_type -> hyapp.wallet.v1.ListResourceShopItemsResponse + 60, // 151: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:output_type -> hyapp.wallet.v1.UpsertResourceShopItemsResponse + 62, // 152: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:output_type -> hyapp.wallet.v1.ResourceShopItemResponse + 64, // 153: hyapp.wallet.v1.WalletService.PurchaseResourceShopItem:output_type -> hyapp.wallet.v1.PurchaseResourceShopItemResponse + 67, // 154: hyapp.wallet.v1.WalletService.ListRechargeBills:output_type -> hyapp.wallet.v1.ListRechargeBillsResponse + 70, // 155: hyapp.wallet.v1.WalletService.GetWalletOverview:output_type -> hyapp.wallet.v1.GetWalletOverviewResponse + 73, // 156: hyapp.wallet.v1.WalletService.GetWalletValueSummary:output_type -> hyapp.wallet.v1.GetWalletValueSummaryResponse + 76, // 157: hyapp.wallet.v1.WalletService.GetUserGiftWall:output_type -> hyapp.wallet.v1.GetUserGiftWallResponse + 79, // 158: hyapp.wallet.v1.WalletService.ListRechargeProducts:output_type -> hyapp.wallet.v1.ListRechargeProductsResponse + 81, // 159: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:output_type -> hyapp.wallet.v1.ConfirmGooglePaymentResponse + 83, // 160: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:output_type -> hyapp.wallet.v1.ListAdminRechargeProductsResponse + 87, // 161: hyapp.wallet.v1.WalletService.CreateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse + 87, // 162: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse + 88, // 163: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:output_type -> hyapp.wallet.v1.DeleteRechargeProductResponse + 91, // 164: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:output_type -> hyapp.wallet.v1.GetDiamondExchangeConfigResponse + 94, // 165: hyapp.wallet.v1.WalletService.ListWalletTransactions:output_type -> hyapp.wallet.v1.ListWalletTransactionsResponse + 97, // 166: hyapp.wallet.v1.WalletService.ApplyWithdrawal:output_type -> hyapp.wallet.v1.ApplyWithdrawalResponse + 102, // 167: hyapp.wallet.v1.WalletService.ListVipPackages:output_type -> hyapp.wallet.v1.ListVipPackagesResponse + 104, // 168: hyapp.wallet.v1.WalletService.GetMyVip:output_type -> hyapp.wallet.v1.GetMyVipResponse + 106, // 169: hyapp.wallet.v1.WalletService.PurchaseVip:output_type -> hyapp.wallet.v1.PurchaseVipResponse + 108, // 170: hyapp.wallet.v1.WalletService.GrantVip:output_type -> hyapp.wallet.v1.GrantVipResponse + 111, // 171: hyapp.wallet.v1.WalletService.ListAdminVipLevels:output_type -> hyapp.wallet.v1.ListAdminVipLevelsResponse + 113, // 172: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:output_type -> hyapp.wallet.v1.UpdateAdminVipLevelsResponse + 115, // 173: hyapp.wallet.v1.WalletService.CreditTaskReward:output_type -> hyapp.wallet.v1.CreditTaskRewardResponse + 117, // 174: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:output_type -> hyapp.wallet.v1.CreditLuckyGiftRewardResponse + 119, // 175: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:output_type -> hyapp.wallet.v1.ApplyGameCoinChangeResponse + 124, // 176: hyapp.wallet.v1.WalletService.GetRedPacketConfig:output_type -> hyapp.wallet.v1.GetRedPacketConfigResponse + 126, // 177: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:output_type -> hyapp.wallet.v1.UpdateRedPacketConfigResponse + 128, // 178: hyapp.wallet.v1.WalletService.CreateRedPacket:output_type -> hyapp.wallet.v1.CreateRedPacketResponse + 130, // 179: hyapp.wallet.v1.WalletService.ClaimRedPacket:output_type -> hyapp.wallet.v1.ClaimRedPacketResponse + 132, // 180: hyapp.wallet.v1.WalletService.ListRedPackets:output_type -> hyapp.wallet.v1.ListRedPacketsResponse + 134, // 181: hyapp.wallet.v1.WalletService.GetRedPacket:output_type -> hyapp.wallet.v1.GetRedPacketResponse + 136, // 182: hyapp.wallet.v1.WalletService.ExpireRedPackets:output_type -> hyapp.wallet.v1.ExpireRedPacketsResponse + 124, // [124:183] is the sub-list for method output_type + 65, // [65:124] is the sub-list for method input_type + 65, // [65:65] is the sub-list for extension type_name + 65, // [65:65] is the sub-list for extension extendee + 0, // [0:65] is the sub-list for field type_name } func init() { file_proto_wallet_v1_wallet_proto_init() } @@ -13581,7 +13774,7 @@ func file_proto_wallet_v1_wallet_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_wallet_v1_wallet_proto_rawDesc), len(file_proto_wallet_v1_wallet_proto_rawDesc)), NumEnums: 0, - NumMessages: 135, + NumMessages: 137, NumExtensions: 0, NumServices: 1, }, diff --git a/api/proto/wallet/v1/wallet.proto b/api/proto/wallet/v1/wallet.proto index 156f59f1..2adcb187 100644 --- a/api/proto/wallet/v1/wallet.proto +++ b/api/proto/wallet/v1/wallet.proto @@ -254,6 +254,7 @@ message UserResourceEntitlement { string source_grant_id = 11; int64 created_at_ms = 12; int64 updated_at_ms = 13; + bool equipped = 14; } message ResourceGrantItem { @@ -659,6 +660,23 @@ message ResourceShopItemResponse { ResourceShopItem item = 1; } +message PurchaseResourceShopItemRequest { + string command_id = 1; + string app_code = 2; + int64 user_id = 3; + int64 shop_item_id = 4; +} + +message PurchaseResourceShopItemResponse { + string order_id = 1; + string transaction_id = 2; + string resource_grant_id = 3; + ResourceShopItem shop_item = 4; + UserResourceEntitlement resource = 5; + AssetBalance balance = 6; + int64 coin_spent = 7; +} + message RechargeBill { string app_code = 1; string transaction_id = 2; @@ -1345,6 +1363,7 @@ service WalletService { rpc ListResourceShopItems(ListResourceShopItemsRequest) returns (ListResourceShopItemsResponse); rpc UpsertResourceShopItems(UpsertResourceShopItemsRequest) returns (UpsertResourceShopItemsResponse); rpc SetResourceShopItemStatus(SetResourceShopItemStatusRequest) returns (ResourceShopItemResponse); + rpc PurchaseResourceShopItem(PurchaseResourceShopItemRequest) returns (PurchaseResourceShopItemResponse); rpc ListRechargeBills(ListRechargeBillsRequest) returns (ListRechargeBillsResponse); rpc GetWalletOverview(GetWalletOverviewRequest) returns (GetWalletOverviewResponse); rpc GetWalletValueSummary(GetWalletValueSummaryRequest) returns (GetWalletValueSummaryResponse); diff --git a/api/proto/wallet/v1/wallet_grpc.pb.go b/api/proto/wallet/v1/wallet_grpc.pb.go index 878249ff..c7ba861a 100644 --- a/api/proto/wallet/v1/wallet_grpc.pb.go +++ b/api/proto/wallet/v1/wallet_grpc.pb.go @@ -48,6 +48,7 @@ const ( WalletService_ListResourceShopItems_FullMethodName = "/hyapp.wallet.v1.WalletService/ListResourceShopItems" WalletService_UpsertResourceShopItems_FullMethodName = "/hyapp.wallet.v1.WalletService/UpsertResourceShopItems" WalletService_SetResourceShopItemStatus_FullMethodName = "/hyapp.wallet.v1.WalletService/SetResourceShopItemStatus" + WalletService_PurchaseResourceShopItem_FullMethodName = "/hyapp.wallet.v1.WalletService/PurchaseResourceShopItem" WalletService_ListRechargeBills_FullMethodName = "/hyapp.wallet.v1.WalletService/ListRechargeBills" WalletService_GetWalletOverview_FullMethodName = "/hyapp.wallet.v1.WalletService/GetWalletOverview" WalletService_GetWalletValueSummary_FullMethodName = "/hyapp.wallet.v1.WalletService/GetWalletValueSummary" @@ -114,6 +115,7 @@ type WalletServiceClient interface { ListResourceShopItems(ctx context.Context, in *ListResourceShopItemsRequest, opts ...grpc.CallOption) (*ListResourceShopItemsResponse, error) UpsertResourceShopItems(ctx context.Context, in *UpsertResourceShopItemsRequest, opts ...grpc.CallOption) (*UpsertResourceShopItemsResponse, error) SetResourceShopItemStatus(ctx context.Context, in *SetResourceShopItemStatusRequest, opts ...grpc.CallOption) (*ResourceShopItemResponse, error) + PurchaseResourceShopItem(ctx context.Context, in *PurchaseResourceShopItemRequest, opts ...grpc.CallOption) (*PurchaseResourceShopItemResponse, error) ListRechargeBills(ctx context.Context, in *ListRechargeBillsRequest, opts ...grpc.CallOption) (*ListRechargeBillsResponse, error) GetWalletOverview(ctx context.Context, in *GetWalletOverviewRequest, opts ...grpc.CallOption) (*GetWalletOverviewResponse, error) GetWalletValueSummary(ctx context.Context, in *GetWalletValueSummaryRequest, opts ...grpc.CallOption) (*GetWalletValueSummaryResponse, error) @@ -443,6 +445,16 @@ func (c *walletServiceClient) SetResourceShopItemStatus(ctx context.Context, in return out, nil } +func (c *walletServiceClient) PurchaseResourceShopItem(ctx context.Context, in *PurchaseResourceShopItemRequest, opts ...grpc.CallOption) (*PurchaseResourceShopItemResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PurchaseResourceShopItemResponse) + err := c.cc.Invoke(ctx, WalletService_PurchaseResourceShopItem_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *walletServiceClient) ListRechargeBills(ctx context.Context, in *ListRechargeBillsRequest, opts ...grpc.CallOption) (*ListRechargeBillsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRechargeBillsResponse) @@ -768,6 +780,7 @@ type WalletServiceServer interface { ListResourceShopItems(context.Context, *ListResourceShopItemsRequest) (*ListResourceShopItemsResponse, error) UpsertResourceShopItems(context.Context, *UpsertResourceShopItemsRequest) (*UpsertResourceShopItemsResponse, error) SetResourceShopItemStatus(context.Context, *SetResourceShopItemStatusRequest) (*ResourceShopItemResponse, error) + PurchaseResourceShopItem(context.Context, *PurchaseResourceShopItemRequest) (*PurchaseResourceShopItemResponse, error) ListRechargeBills(context.Context, *ListRechargeBillsRequest) (*ListRechargeBillsResponse, error) GetWalletOverview(context.Context, *GetWalletOverviewRequest) (*GetWalletOverviewResponse, error) GetWalletValueSummary(context.Context, *GetWalletValueSummaryRequest) (*GetWalletValueSummaryResponse, error) @@ -894,6 +907,9 @@ func (UnimplementedWalletServiceServer) UpsertResourceShopItems(context.Context, func (UnimplementedWalletServiceServer) SetResourceShopItemStatus(context.Context, *SetResourceShopItemStatusRequest) (*ResourceShopItemResponse, error) { return nil, status.Error(codes.Unimplemented, "method SetResourceShopItemStatus not implemented") } +func (UnimplementedWalletServiceServer) PurchaseResourceShopItem(context.Context, *PurchaseResourceShopItemRequest) (*PurchaseResourceShopItemResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PurchaseResourceShopItem not implemented") +} func (UnimplementedWalletServiceServer) ListRechargeBills(context.Context, *ListRechargeBillsRequest) (*ListRechargeBillsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListRechargeBills not implemented") } @@ -1524,6 +1540,24 @@ func _WalletService_SetResourceShopItemStatus_Handler(srv interface{}, ctx conte return interceptor(ctx, in, info, handler) } +func _WalletService_PurchaseResourceShopItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PurchaseResourceShopItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServiceServer).PurchaseResourceShopItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WalletService_PurchaseResourceShopItem_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServiceServer).PurchaseResourceShopItem(ctx, req.(*PurchaseResourceShopItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _WalletService_ListRechargeBills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRechargeBillsRequest) if err := dec(in); err != nil { @@ -2169,6 +2203,10 @@ var WalletService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SetResourceShopItemStatus", Handler: _WalletService_SetResourceShopItemStatus_Handler, }, + { + MethodName: "PurchaseResourceShopItem", + Handler: _WalletService_PurchaseResourceShopItem_Handler, + }, { MethodName: "ListRechargeBills", Handler: _WalletService_ListRechargeBills_Handler, diff --git a/docs/flutter对接/背包接口Flutter对接.md b/docs/flutter对接/背包接口Flutter对接.md new file mode 100644 index 00000000..25abf1e0 --- /dev/null +++ b/docs/flutter对接/背包接口Flutter对接.md @@ -0,0 +1,434 @@ +# 背包接口 Flutter 对接 + +本文描述 Flutter App 查询当前登录用户背包资源和佩戴装扮的 HTTP 接口。背包事实由 `wallet-service` 维护,App 只通过 gateway 读取当前用户自己的有效资源权益,不传 `user_id`,也不从礼物配置、房间消息或本地缓存推算用户是否拥有某个资源。 + +## 接口 + +Base URL: + +```text +https:// +``` + +本地开发: + +```text +http://127.0.0.1:13000 +``` + +| 功能 | Method | Path | +| --- | --- | --- | +| 查询我的背包资源 | `GET` | `/api/v1/users/me/resources` | +| 佩戴我的资源 | `POST` | `/api/v1/users/me/resources/{resource_id}/equip` | + +## 通用请求 + +Headers: + +| Header | 必填 | 说明 | +| --- | --- | --- | +| `Authorization` | 是 | `Bearer ` | +| `Content-Type` | POST 必填 | `application/json` | +| `X-App-Code` | 否 | App 编码,默认 `lalu` | +| `X-App-Package` | 否 | 包名解析 App 时使用 | +| `X-App-Platform` | 否 | `android` / `ios` | + +统一成功响应: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": {} +} +``` + +统一失败响应: + +```json +{ + "code": "INVALID_ARGUMENT", + "message": "invalid argument", + "request_id": "req_abc" +} +``` + +Flutter 只在 `code == "OK"` 时读取 `data`;失败时把 `request_id` 写入客户端日志,便于后端排查。 + +## 查询我的背包资源 + +```http +GET /api/v1/users/me/resources?resource_type=avatar_frame +Authorization: Bearer +X-App-Code: lalu +``` + +Query: + +| 字段 | 必填 | 说明 | +| --- | --- | --- | +| `resource_type` | 否 | 不传返回全部有效权益;传入时只返回该类型。 | + +当前可用于背包过滤的资源类型: + +| 值 | 说明 | 可佩戴 | +| --- | --- | --- | +| `avatar_frame` | 头像框 | 是 | +| `profile_card` | 资料卡 | 是 | +| `vehicle` | 座驾 | 是 | +| `chat_bubble` | 气泡 | 是 | +| `badge` | 徽章 | 是 | +| `gift` | 礼物权益 | 否 | +| `floating_screen` | 飘屏 | 否 | +| `mic_seat_icon` | 麦位图标 | 否 | +| `mic_seat_animation` | 麦位动画 | 否 | +| `emoji_pack` | 表情包 | 否 | + +接口只返回当前有效权益:`status=active`、已到生效时间、未过期、`remaining_quantity > 0`。`expires_at_ms = 0` 表示永久有效。 + +成功响应: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "items": [ + { + "entitlement_id": "ent_10001_9001_1710000000000", + "resource_id": 9001, + "resource": { + "resource_id": 9001, + "resource_code": "vip_avatar_frame_1", + "resource_type": "avatar_frame", + "name": "VIP 头像框", + "status": "active", + "grantable": true, + "grant_strategy": "extend_expiry", + "usage_scopes": ["profile", "room"], + "asset_url": "https://cdn.example/avatar-frame.png", + "preview_url": "https://cdn.example/avatar-frame-preview.png", + "animation_url": "", + "metadata_json": "{}", + "sort_order": 10, + "created_at_ms": 1710000000000, + "updated_at_ms": 1710000000000 + }, + "status": "active", + "quantity": 1, + "remaining_quantity": 1, + "effective_at_ms": 1710000000000, + "expires_at_ms": 1712592000000, + "source_grant_id": "grant_xxx", + "created_at_ms": 1710000000000, + "updated_at_ms": 1710000000000, + "equipped": true + } + ], + "total": 1 + } +} +``` + +字段说明: + +| 字段 | 说明 | +| --- | --- | +| `items` | 当前登录用户的有效资源权益列表。 | +| `total` | 当前响应条数,等于 `items.length`;该接口当前不分页。 | +| `entitlement_id` | 用户拥有的具体权益 ID;同一 `resource_id` 可能有多条不同期限的权益。 | +| `resource_id` | 资源 ID,用于佩戴接口路径。 | +| `resource.resource_type` | 资源类型,用于客户端分组展示。 | +| `resource.asset_url` | 主展示资源,客户端渲染优先使用。 | +| `resource.preview_url` | 预览资源,可为空。 | +| `resource.animation_url` | 动效资源,可为空。 | +| `resource.metadata_json` | 后台配置的扩展 JSON 字符串;客户端按业务需要解析,不能假设一定有字段。 | +| `quantity` | 发放时的权益数量。 | +| `remaining_quantity` | 剩余可用数量;大于 0 才会在背包列表返回。 | +| `effective_at_ms` | 生效时间,Unix epoch milliseconds。 | +| `expires_at_ms` | 过期时间,Unix epoch milliseconds;`0` 表示永久。 | +| `equipped` | 当前权益是否是该资源类型的已佩戴项。每个可佩戴 `resource_type` 同一时间最多一条为 `true`。 | + +## 佩戴我的资源 + +```http +POST /api/v1/users/me/resources/9001/equip +Authorization: Bearer +Content-Type: application/json +X-App-Code: lalu +``` + +Path: + +| 字段 | 必填 | 说明 | +| --- | --- | --- | +| `resource_id` | 是 | 要佩戴的资源 ID,必须来自当前用户有效背包权益。 | + +Body: + +```json +{ + "entitlement_id": "ent_10001_9001_1710000000000" +} +``` + +| 字段 | 必填 | 说明 | +| --- | --- | --- | +| `entitlement_id` | 否 | 指定佩戴哪一条权益;不传时后端自动选择该资源当前有效权益。 | + +成功响应: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "entitlement_id": "ent_10001_9001_1710000000000", + "resource_id": 9001, + "resource": { + "resource_id": 9001, + "resource_code": "vip_avatar_frame_1", + "resource_type": "avatar_frame", + "name": "VIP 头像框", + "status": "active", + "asset_url": "https://cdn.example/avatar-frame.png", + "preview_url": "https://cdn.example/avatar-frame-preview.png", + "animation_url": "", + "metadata_json": "{}", + "sort_order": 10, + "created_at_ms": 1710000000000, + "updated_at_ms": 1710000000000 + }, + "status": "active", + "quantity": 1, + "remaining_quantity": 1, + "effective_at_ms": 1710000000000, + "expires_at_ms": 1712592000000, + "source_grant_id": "grant_xxx", + "created_at_ms": 1710000000000, + "updated_at_ms": 1710000000000, + "equipped": true + } +} +``` + +佩戴规则: + +| 规则 | 说明 | +| --- | --- | +| 可佩戴类型 | `avatar_frame`、`profile_card`、`vehicle`、`chat_bubble`、`badge`。 | +| 不可佩戴类型 | `gift`、`floating_screen`、`mic_seat_icon`、`mic_seat_animation`、`emoji_pack`。 | +| 同类替换 | 同一个 `resource_type` 只有一个当前佩戴项,新佩戴会替换旧佩戴。 | +| 权益校验 | 必须是当前登录用户自己的有效权益;过期、禁用、剩余数量为 0 都不能佩戴。 | +| 徽章展示 | 背包佩戴的 `badge` 是单装备槽;资料页多徽章展示仍使用 `/api/v1/badges/me` 和 `/api/v1/badges/display`。 | + +常见错误: + +| HTTP | `code` | 场景 | +| --- | --- | --- | +| `400` | `INVALID_ARGUMENT` | `resource_id` 非法、资源类型不可佩戴、请求 JSON 无效。 | +| `401` | `UNAUTHORIZED` | 未登录或 access token 无效。 | +| `403` | `PROFILE_REQUIRED` | 当前账号未完成必填资料。 | +| `404` | `NOT_FOUND` | 当前用户没有这条有效权益,或指定 `entitlement_id` 不存在。 | +| `502` | `UPSTREAM_ERROR` | gateway 调 wallet-service 失败。 | + +## Flutter 解析示例 + +```dart +class ApiEnvelope { + ApiEnvelope({ + required this.code, + required this.message, + required this.requestId, + this.data, + }); + + final String code; + final String message; + final String requestId; + final T? data; + + factory ApiEnvelope.fromJson( + Map json, + T Function(Object? raw) parseData, + ) { + return ApiEnvelope( + code: json['code'] as String? ?? '', + message: json['message'] as String? ?? '', + requestId: json['request_id'] as String? ?? '', + data: json['data'] == null ? null : parseData(json['data']), + ); + } +} + +class BackpackResourceList { + BackpackResourceList({ + required this.items, + required this.total, + }); + + final List items; + final int total; + + factory BackpackResourceList.fromJson(Object? raw) { + final json = raw as Map? ?? const {}; + return BackpackResourceList( + items: (json['items'] as List? ?? const []) + .map((item) => BackpackResourceEntitlement.fromJson(item as Map)) + .toList(), + total: (json['total'] as num?)?.toInt() ?? 0, + ); + } +} + +class BackpackResourceEntitlement { + BackpackResourceEntitlement({ + required this.entitlementId, + required this.resourceId, + required this.resource, + required this.status, + required this.quantity, + required this.remainingQuantity, + required this.effectiveAtMs, + required this.expiresAtMs, + required this.sourceGrantId, + required this.createdAtMs, + required this.updatedAtMs, + required this.equipped, + }); + + final String entitlementId; + final int resourceId; + final BackpackResource resource; + final String status; + final int quantity; + final int remainingQuantity; + final int effectiveAtMs; + final int expiresAtMs; + final String sourceGrantId; + final int createdAtMs; + final int updatedAtMs; + final bool equipped; + + bool get permanent => expiresAtMs == 0; + bool get equipable => const { + 'avatar_frame', + 'profile_card', + 'vehicle', + 'chat_bubble', + 'badge', + }.contains(resource.resourceType); + + factory BackpackResourceEntitlement.fromJson(Map json) { + return BackpackResourceEntitlement( + entitlementId: json['entitlement_id'] as String? ?? '', + resourceId: (json['resource_id'] as num?)?.toInt() ?? 0, + resource: BackpackResource.fromJson(json['resource'] as Map? ?? const {}), + status: json['status'] as String? ?? '', + quantity: (json['quantity'] as num?)?.toInt() ?? 0, + remainingQuantity: (json['remaining_quantity'] as num?)?.toInt() ?? 0, + effectiveAtMs: (json['effective_at_ms'] as num?)?.toInt() ?? 0, + expiresAtMs: (json['expires_at_ms'] as num?)?.toInt() ?? 0, + sourceGrantId: json['source_grant_id'] as String? ?? '', + createdAtMs: (json['created_at_ms'] as num?)?.toInt() ?? 0, + updatedAtMs: (json['updated_at_ms'] as num?)?.toInt() ?? 0, + equipped: json['equipped'] as bool? ?? false, + ); + } +} + +class BackpackResource { + BackpackResource({ + required this.resourceId, + required this.resourceCode, + required this.resourceType, + required this.name, + required this.status, + required this.assetUrl, + required this.previewUrl, + required this.animationUrl, + required this.metadataJson, + required this.sortOrder, + }); + + final int resourceId; + final String resourceCode; + final String resourceType; + final String name; + final String status; + final String assetUrl; + final String previewUrl; + final String animationUrl; + final String metadataJson; + final int sortOrder; + + factory BackpackResource.fromJson(Map json) { + return BackpackResource( + resourceId: (json['resource_id'] as num?)?.toInt() ?? 0, + resourceCode: json['resource_code'] as String? ?? '', + resourceType: json['resource_type'] as String? ?? '', + name: json['name'] as String? ?? '', + status: json['status'] as String? ?? '', + assetUrl: json['asset_url'] as String? ?? '', + previewUrl: json['preview_url'] as String? ?? '', + animationUrl: json['animation_url'] as String? ?? '', + metadataJson: json['metadata_json'] as String? ?? '{}', + sortOrder: (json['sort_order'] as num?)?.toInt() ?? 0, + ); + } +} +``` + +## Flutter 调用示例 + +```dart +Future fetchBackpackResources({ + String? resourceType, +}) async { + final response = await dio.get>( + '/api/v1/users/me/resources', + queryParameters: { + if (resourceType != null && resourceType.isNotEmpty) 'resource_type': resourceType, + }, + ); + final envelope = ApiEnvelope.fromJson( + response.data ?? const {}, + BackpackResourceList.fromJson, + ); + if (envelope.code != 'OK' || envelope.data == null) { + throw ApiException(envelope.code, envelope.message, envelope.requestId); + } + return envelope.data!; +} + +Future equipBackpackResource({ + required int resourceId, + String? entitlementId, +}) async { + final response = await dio.post>( + '/api/v1/users/me/resources/$resourceId/equip', + data: { + if (entitlementId != null && entitlementId.isNotEmpty) 'entitlement_id': entitlementId, + }, + ); + final envelope = ApiEnvelope.fromJson( + response.data ?? const {}, + (raw) => BackpackResourceEntitlement.fromJson(raw as Map? ?? const {}), + ); + if (envelope.code != 'OK' || envelope.data == null) { + throw ApiException(envelope.code, envelope.message, envelope.requestId); + } + return envelope.data!; +} +``` + +客户端交互建议: + +1. 背包首页先请求 `/api/v1/users/me/resources`,本地按 `resource.resource_type` 分组渲染 Tab。 +2. 单类型页面使用 `resource_type` 过滤,减少本地筛选和无关图片预加载。 +3. 佩戴成功后可直接用响应里的 `equipped=true` 更新当前类型列表:同类型其他 item 置为 `false`,当前 item 置为 `true`。 +4. 进入资料页或房间展示前,如需要最新装扮状态,重新拉背包或对应资料展示接口,不依赖旧缓存。 +5. 所有 `*_ms` 都是 Unix epoch milliseconds,展示层按用户本地时区格式化;不要把本地时区传回后端做背包有效期判断。 diff --git a/docs/openapi/gateway.swagger.yaml b/docs/openapi/gateway.swagger.yaml index f0739d6f..7de41ee6 100644 --- a/docs/openapi/gateway.swagger.yaml +++ b/docs/openapi/gateway.swagger.yaml @@ -1703,7 +1703,7 @@ paths: in: query required: false type: string - enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift] + enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift, mic_seat_icon, mic_seat_animation, emoji_pack] - name: keyword in: query required: false @@ -1747,7 +1747,7 @@ paths: in: query required: false type: string - enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift] + enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift, mic_seat_icon, mic_seat_animation, emoji_pack] - name: page in: query required: false @@ -1931,7 +1931,7 @@ paths: in: query required: false type: string - enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift] + enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift, mic_seat_icon, mic_seat_animation, emoji_pack] responses: "200": description: 返回当前用户有效资源权益。 @@ -3394,7 +3394,7 @@ definitions: type: string resource_type: type: string - enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift] + enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift, mic_seat_icon, mic_seat_animation, emoji_pack] name: type: string status: @@ -3447,7 +3447,7 @@ definitions: description: 资源 ID;按字符串返回避免 64 位整数在客户端丢精度。 resource_type: type: string - enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift] + enum: [avatar_frame, profile_card, coin, vehicle, chat_bubble, badge, floating_screen, gift, mic_seat_icon, mic_seat_animation, emoji_pack] name: type: string asset_url: @@ -3755,6 +3755,9 @@ definitions: format: int64 source_grant_id: type: string + equipped: + type: boolean + description: 当前权益是否是该资源类型的已佩戴项。 UserResourceListData: type: object properties: diff --git a/services/gateway-service/internal/client/wallet_client.go b/services/gateway-service/internal/client/wallet_client.go index 7b122833..a1a608d8 100644 --- a/services/gateway-service/internal/client/wallet_client.go +++ b/services/gateway-service/internal/client/wallet_client.go @@ -27,6 +27,7 @@ type WalletClient interface { GetResource(ctx context.Context, req *walletv1.GetResourceRequest) (*walletv1.GetResourceResponse, error) GetResourceGroup(ctx context.Context, req *walletv1.GetResourceGroupRequest) (*walletv1.GetResourceGroupResponse, error) ListResourceShopItems(ctx context.Context, req *walletv1.ListResourceShopItemsRequest) (*walletv1.ListResourceShopItemsResponse, error) + PurchaseResourceShopItem(ctx context.Context, req *walletv1.PurchaseResourceShopItemRequest) (*walletv1.PurchaseResourceShopItemResponse, error) ListGiftConfigs(ctx context.Context, req *walletv1.ListGiftConfigsRequest) (*walletv1.ListGiftConfigsResponse, error) ListGiftTypeConfigs(ctx context.Context, req *walletv1.ListGiftTypeConfigsRequest) (*walletv1.ListGiftTypeConfigsResponse, error) GrantResource(ctx context.Context, req *walletv1.GrantResourceRequest) (*walletv1.ResourceGrantResponse, error) @@ -116,6 +117,10 @@ func (c *grpcWalletClient) ListResourceShopItems(ctx context.Context, req *walle return c.client.ListResourceShopItems(ctx, req) } +func (c *grpcWalletClient) PurchaseResourceShopItem(ctx context.Context, req *walletv1.PurchaseResourceShopItemRequest) (*walletv1.PurchaseResourceShopItemResponse, error) { + return c.client.PurchaseResourceShopItem(ctx, req) +} + func (c *grpcWalletClient) ListGiftConfigs(ctx context.Context, req *walletv1.ListGiftConfigsRequest) (*walletv1.ListGiftConfigsResponse, error) { return c.client.ListGiftConfigs(ctx, req) } diff --git a/services/gateway-service/internal/transport/http/httproutes/router.go b/services/gateway-service/internal/transport/http/httproutes/router.go index be13c43e..142709d9 100644 --- a/services/gateway-service/internal/transport/http/httproutes/router.go +++ b/services/gateway-service/internal/transport/http/httproutes/router.go @@ -47,6 +47,7 @@ type AppHandlers struct { GetAppVersion http.HandlerFunc GetResourceGroup http.HandlerFunc ListResourceShopItems http.HandlerFunc + PurchaseResourceShopItem http.HandlerFunc ListGifts http.HandlerFunc ListGiftTabs http.HandlerFunc ListEmojiPacks http.HandlerFunc @@ -252,6 +253,7 @@ func (r routes) registerAppRoutes() { r.public("/app/version", http.MethodGet, h.GetAppVersion) r.public("/resource-groups/{group_id}", "", h.GetResourceGroup) r.public("/resource-shop/items", http.MethodGet, h.ListResourceShopItems) + r.profile("/resource-shop/items/{shop_item_id}/purchase", http.MethodPost, h.PurchaseResourceShopItem) r.public("/gifts", "", h.ListGifts) r.public("/gift-tabs", http.MethodGet, h.ListGiftTabs) r.public("/emoji-packs", http.MethodGet, h.ListEmojiPacks) diff --git a/services/gateway-service/internal/transport/http/resourceapi/handler.go b/services/gateway-service/internal/transport/http/resourceapi/handler.go index 3a94ac79..b776cd03 100644 --- a/services/gateway-service/internal/transport/http/resourceapi/handler.go +++ b/services/gateway-service/internal/transport/http/resourceapi/handler.go @@ -32,6 +32,10 @@ func (h *Handler) ListResourceShopItems(writer http.ResponseWriter, request *htt h.listResourceShopItems(writer, request) } +func (h *Handler) PurchaseResourceShopItem(writer http.ResponseWriter, request *http.Request) { + h.purchaseResourceShopItem(writer, request) +} + func (h *Handler) ListGifts(writer http.ResponseWriter, request *http.Request) { h.listGifts(writer, request) } diff --git a/services/gateway-service/internal/transport/http/resourceapi/resource_handler.go b/services/gateway-service/internal/transport/http/resourceapi/resource_handler.go index a4863aab..50ba4392 100644 --- a/services/gateway-service/internal/transport/http/resourceapi/resource_handler.go +++ b/services/gateway-service/internal/transport/http/resourceapi/resource_handler.go @@ -83,6 +83,28 @@ type resourceShopItemData struct { UpdatedAtMS int64 `json:"updated_at_ms"` } +type resourceShopPurchaseRequestBody struct { + CommandID string `json:"command_id"` + CommandIDAlt string `json:"commandId"` +} + +type resourceShopPurchaseData struct { + OrderID string `json:"order_id"` + TransactionID string `json:"transaction_id"` + ResourceGrantID string `json:"resource_grant_id"` + CoinSpent int64 `json:"coin_spent"` + Balance resourceAssetBalanceData `json:"balance"` + ShopItem resourceShopItemData `json:"shop_item"` + Resource userResourceData `json:"resource"` +} + +type resourceAssetBalanceData struct { + AssetType string `json:"asset_type"` + AvailableAmount int64 `json:"available_amount"` + FrozenAmount int64 `json:"frozen_amount"` + Version int64 `json:"version"` +} + type giftConfigData struct { GiftID string `json:"gift_id"` ResourceID int64 `json:"resource_id"` @@ -151,6 +173,7 @@ type userResourceData struct { SourceGrantID string `json:"source_grant_id"` CreatedAtMS int64 `json:"created_at_ms"` UpdatedAtMS int64 `json:"updated_at_ms"` + Equipped bool `json:"equipped"` } func (h *Handler) listResources(writer http.ResponseWriter, request *http.Request) { @@ -240,6 +263,41 @@ func (h *Handler) listResourceShopItems(writer http.ResponseWriter, request *htt httpkit.WriteOK(writer, request, map[string]any{"items": items, "total": resp.GetTotal(), "page": page, "page_size": pageSize}) } +func (h *Handler) purchaseResourceShopItem(writer http.ResponseWriter, request *http.Request) { + if h.walletClient == nil { + httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") + return + } + shopItemID, ok := httpkit.PositiveInt64PathValue(request, "shop_item_id") + if !ok { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") + return + } + var body resourceShopPurchaseRequestBody + if !httpkit.Decode(writer, request, &body) { + return + } + commandID := strings.TrimSpace(body.CommandID) + if commandID == "" { + commandID = strings.TrimSpace(body.CommandIDAlt) + } + if commandID == "" { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") + return + } + resp, err := h.walletClient.PurchaseResourceShopItem(request.Context(), &walletv1.PurchaseResourceShopItemRequest{ + CommandId: commandID, + AppCode: appcode.FromContext(request.Context()), + UserId: auth.UserIDFromContext(request.Context()), + ShopItemId: shopItemID, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, resourceShopPurchaseFromProto(resp)) +} + func (h *Handler) listGifts(writer http.ResponseWriter, request *http.Request) { if h.walletClient == nil { httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") @@ -526,6 +584,33 @@ func resourceShopItemFromProto(item *walletv1.ResourceShopItem) resourceShopItem } } +func resourceShopPurchaseFromProto(resp *walletv1.PurchaseResourceShopItemResponse) resourceShopPurchaseData { + if resp == nil { + return resourceShopPurchaseData{} + } + return resourceShopPurchaseData{ + OrderID: resp.GetOrderId(), + TransactionID: resp.GetTransactionId(), + ResourceGrantID: resp.GetResourceGrantId(), + CoinSpent: resp.GetCoinSpent(), + Balance: resourceBalanceFromProto(resp.GetBalance()), + ShopItem: resourceShopItemFromProto(resp.GetShopItem()), + Resource: userResourceFromProto(resp.GetResource()), + } +} + +func resourceBalanceFromProto(balance *walletv1.AssetBalance) resourceAssetBalanceData { + if balance == nil { + return resourceAssetBalanceData{} + } + return resourceAssetBalanceData{ + AssetType: balance.GetAssetType(), + AvailableAmount: balance.GetAvailableAmount(), + FrozenAmount: balance.GetFrozenAmount(), + Version: balance.GetVersion(), + } +} + func giftFromProto(gift *walletv1.GiftConfig) giftConfigData { if gift == nil { return giftConfigData{} @@ -588,6 +673,7 @@ func userResourceFromProto(item *walletv1.UserResourceEntitlement) userResourceD SourceGrantID: item.GetSourceGrantId(), CreatedAtMS: item.GetCreatedAtMs(), UpdatedAtMS: item.GetUpdatedAtMs(), + Equipped: item.GetEquipped(), } } diff --git a/services/gateway-service/internal/transport/http/response_test.go b/services/gateway-service/internal/transport/http/response_test.go index 9492d7b8..ea86c111 100644 --- a/services/gateway-service/internal/transport/http/response_test.go +++ b/services/gateway-service/internal/transport/http/response_test.go @@ -399,6 +399,8 @@ type fakeWalletClient struct { resourceGroupsByID map[int64]*walletv1.ResourceGroup lastResourceShop *walletv1.ListResourceShopItemsRequest resourceShopResp *walletv1.ListResourceShopItemsResponse + lastPurchaseShop *walletv1.PurchaseResourceShopItemRequest + purchaseShopResp *walletv1.PurchaseResourceShopItemResponse lastListGiftConfigs *walletv1.ListGiftConfigsRequest listGiftConfigsResp *walletv1.ListGiftConfigsResponse lastListGiftTypes *walletv1.ListGiftTypeConfigsRequest @@ -1238,6 +1240,17 @@ func (f *fakeWalletClient) ListResourceShopItems(_ context.Context, req *walletv return &walletv1.ListResourceShopItemsResponse{}, nil } +func (f *fakeWalletClient) PurchaseResourceShopItem(_ context.Context, req *walletv1.PurchaseResourceShopItemRequest) (*walletv1.PurchaseResourceShopItemResponse, error) { + f.lastPurchaseShop = req + if f.err != nil { + return nil, f.err + } + if f.purchaseShopResp != nil { + return f.purchaseShopResp, nil + } + return &walletv1.PurchaseResourceShopItemResponse{}, nil +} + func (f *fakeWalletClient) ListGiftConfigs(_ context.Context, req *walletv1.ListGiftConfigsRequest) (*walletv1.ListGiftConfigsResponse, error) { f.lastListGiftConfigs = req if f.err != nil { diff --git a/services/gateway-service/internal/transport/http/router.go b/services/gateway-service/internal/transport/http/router.go index baaf3b15..8c35629f 100644 --- a/services/gateway-service/internal/transport/http/router.go +++ b/services/gateway-service/internal/transport/http/router.go @@ -135,6 +135,7 @@ func (h *Handler) Routes(jwtVerifier *auth.Verifier) http.Handler { GetAppVersion: appAPI.GetAppVersion, GetResourceGroup: resourceAPI.GetResourceGroup, ListResourceShopItems: resourceAPI.ListResourceShopItems, + PurchaseResourceShopItem: resourceAPI.PurchaseResourceShopItem, ListGifts: resourceAPI.ListGifts, ListGiftTabs: resourceAPI.ListGiftTabs, ListEmojiPacks: resourceAPI.ListEmojiPacks, diff --git a/services/wallet-service/deploy/mysql/initdb/001_wallet_service.sql b/services/wallet-service/deploy/mysql/initdb/001_wallet_service.sql index 3ebb0440..9ba48965 100644 --- a/services/wallet-service/deploy/mysql/initdb/001_wallet_service.sql +++ b/services/wallet-service/deploy/mysql/initdb/001_wallet_service.sql @@ -423,6 +423,29 @@ CREATE TABLE IF NOT EXISTS resource_shop_items ( KEY idx_resource_shop_items_effective (app_code, status, effective_from_ms, effective_to_ms) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='道具商店售卖资源表'; +CREATE TABLE IF NOT EXISTS resource_shop_purchase_orders ( + app_code VARCHAR(32) NOT NULL DEFAULT 'lalu' COMMENT '应用编码,用于多租户隔离', + order_id VARCHAR(96) NOT NULL COMMENT '道具商店订单 ID', + command_id VARCHAR(128) NOT NULL COMMENT 'App 购买命令幂等 ID', + user_id BIGINT NOT NULL COMMENT '购买用户 ID', + shop_item_id BIGINT NOT NULL COMMENT '道具商店条目 ID', + resource_id BIGINT NOT NULL COMMENT '资源 ID', + duration_days INT NOT NULL COMMENT '购买生效天数,订单快照', + price_coin BIGINT NOT NULL COMMENT '实扣金币,订单快照', + status VARCHAR(32) NOT NULL COMMENT '订单状态', + wallet_transaction_id VARCHAR(96) NOT NULL COMMENT '扣费钱包交易 ID', + resource_grant_id VARCHAR(96) NOT NULL COMMENT '资源发放 ID', + entitlement_id VARCHAR(96) NOT NULL COMMENT '最终权益 ID', + request_hash VARCHAR(128) NOT NULL COMMENT '购买请求语义哈希', + created_at_ms BIGINT NOT NULL COMMENT '创建时间,UTC epoch ms', + updated_at_ms BIGINT NOT NULL COMMENT '更新时间,UTC epoch ms', + PRIMARY KEY (app_code, order_id), + UNIQUE KEY uk_resource_shop_purchase_command (app_code, command_id), + KEY idx_resource_shop_purchase_user_time (app_code, user_id, created_at_ms), + KEY idx_resource_shop_purchase_tx (app_code, wallet_transaction_id), + KEY idx_resource_shop_purchase_entitlement (app_code, entitlement_id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='道具商店购买订单表'; + CREATE TABLE IF NOT EXISTS gift_type_configs ( app_code VARCHAR(32) NOT NULL DEFAULT 'lalu' COMMENT '应用编码,用于多租户隔离', type_code VARCHAR(32) NOT NULL COMMENT '礼物类型编码,供 gift_configs 引用', diff --git a/services/wallet-service/internal/domain/resource/resource.go b/services/wallet-service/internal/domain/resource/resource.go index ab1ca056..c72ccba3 100644 --- a/services/wallet-service/internal/domain/resource/resource.go +++ b/services/wallet-service/internal/domain/resource/resource.go @@ -36,6 +36,7 @@ const ( GrantSourceManagerCenter = "manager_center" GrantSourceGrowthLevel = "growth_level" GrantSourceAchievement = "achievement" + GrantSourceResourceShop = "resource_shop" GrantStatusDone = "succeeded" ResultWalletCredit = "wallet_credit" ResultEntitlement = "entitlement" @@ -204,6 +205,7 @@ type UserResourceEntitlement struct { SourceGrantID string CreatedAtMS int64 UpdatedAtMS int64 + Equipped bool } type ResourceGrantItem struct { @@ -435,6 +437,23 @@ type ResourceShopItemStatusCommand struct { OperatorUserID int64 } +type ResourceShopPurchaseCommand struct { + AppCode string + CommandID string + UserID int64 + ShopItemID int64 +} + +type ResourceShopPurchaseReceipt struct { + OrderID string + TransactionID string + ShopItem ResourceShopItem + Resource UserResourceEntitlement + Balance ledger.AssetBalance + CoinSpent int64 + GrantID string +} + // BadgeGrantOutbox is a wallet resource grant event relayed to activity-service badge display projection. type BadgeGrantOutbox struct { AppCode string diff --git a/services/wallet-service/internal/service/wallet/resource.go b/services/wallet-service/internal/service/wallet/resource.go index ce5e0a9e..750ddae5 100644 --- a/services/wallet-service/internal/service/wallet/resource.go +++ b/services/wallet-service/internal/service/wallet/resource.go @@ -241,3 +241,19 @@ func (s *Service) SetResourceShopItemStatus(ctx context.Context, command resourc ctx = appcode.WithContext(ctx, command.AppCode) return s.repository.SetResourceShopItemStatus(ctx, command) } + +func (s *Service) PurchaseResourceShopItem(ctx context.Context, command resourcedomain.ResourceShopPurchaseCommand) (resourcedomain.ResourceShopPurchaseReceipt, error) { + if strings.TrimSpace(command.CommandID) == "" || command.UserID <= 0 || command.ShopItemID <= 0 { + return resourcedomain.ResourceShopPurchaseReceipt{}, xerr.New(xerr.InvalidArgument, "resource shop purchase command is incomplete") + } + if len(command.CommandID) > 128 { + return resourcedomain.ResourceShopPurchaseReceipt{}, xerr.New(xerr.InvalidArgument, "command_id is too long") + } + if s.repository == nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, xerr.New(xerr.Unavailable, "wallet repository is not configured") + } + command.AppCode = appcode.Normalize(command.AppCode) + command.CommandID = strings.TrimSpace(command.CommandID) + ctx = appcode.WithContext(ctx, command.AppCode) + return s.repository.PurchaseResourceShopItem(ctx, command) +} diff --git a/services/wallet-service/internal/service/wallet/service.go b/services/wallet-service/internal/service/wallet/service.go index c2ba526e..5271cf86 100644 --- a/services/wallet-service/internal/service/wallet/service.go +++ b/services/wallet-service/internal/service/wallet/service.go @@ -77,6 +77,7 @@ type Repository interface { ListResourceShopItems(ctx context.Context, query resourcedomain.ListResourceShopItemsQuery) ([]resourcedomain.ResourceShopItem, int64, error) UpsertResourceShopItems(ctx context.Context, command resourcedomain.ResourceShopItemsCommand) ([]resourcedomain.ResourceShopItem, error) SetResourceShopItemStatus(ctx context.Context, command resourcedomain.ResourceShopItemStatusCommand) (resourcedomain.ResourceShopItem, error) + PurchaseResourceShopItem(ctx context.Context, command resourcedomain.ResourceShopPurchaseCommand) (resourcedomain.ResourceShopPurchaseReceipt, error) ProjectPendingGiftWallEvents(ctx context.Context, workerID string, limit int, lockTTL time.Duration) (int, error) ClaimPendingBadgeGrantEvents(ctx context.Context, workerID string, nowMS int64, lockTTL time.Duration, batchSize int) ([]resourcedomain.BadgeGrantOutbox, error) MarkBadgeGrantEventDelivered(ctx context.Context, event resourcedomain.BadgeGrantOutbox, nowMS int64) error diff --git a/services/wallet-service/internal/service/wallet/service_test.go b/services/wallet-service/internal/service/wallet/service_test.go index 297a5ba9..f0965f0a 100644 --- a/services/wallet-service/internal/service/wallet/service_test.go +++ b/services/wallet-service/internal/service/wallet/service_test.go @@ -1290,6 +1290,84 @@ func TestGrantResourceGroupExpandsWalletAssetAndEntitlement(t *testing.T) { } } +// TestPurchaseResourceShopItemDebitsCoinAndGrantsEntitlement 锁定道具商店购买的原子语义。 +func TestPurchaseResourceShopItemDebitsCoinAndGrantsEntitlement(t *testing.T) { + repository := mysqltest.NewRepository(t) + repository.SetBalance(53001, 1000) + svc := walletservice.New(repository) + ctx := context.Background() + + resource, err := svc.CreateResource(ctx, resourcedomain.ResourceCommand{ + ResourceCode: "shop_frame_gold", + ResourceType: resourcedomain.TypeAvatarFrame, + Name: "Gold Frame", + Status: resourcedomain.StatusActive, + Grantable: true, + GrantStrategy: resourcedomain.GrantStrategyExtendExpiry, + PriceType: resourcedomain.PriceTypeCoin, + CoinPrice: 100, + UsageScopes: []string{"profile"}, + OperatorUserID: 90001, + }) + if err != nil { + t.Fatalf("create shop resource failed: %v", err) + } + shopItems, err := svc.UpsertResourceShopItems(ctx, resourcedomain.ResourceShopItemsCommand{ + Items: []resourcedomain.ResourceShopItemInput{{ + ResourceID: resource.ResourceID, + Status: resourcedomain.StatusActive, + DurationDays: resourcedomain.ShopDurationThreeDays, + SortOrder: 1, + }}, + OperatorUserID: 90001, + }) + if err != nil { + t.Fatalf("upsert shop item failed: %v", err) + } + + receipt, err := svc.PurchaseResourceShopItem(ctx, resourcedomain.ResourceShopPurchaseCommand{ + CommandID: "cmd-shop-frame", + UserID: 53001, + ShopItemID: shopItems[0].ShopItemID, + }) + if err != nil { + t.Fatalf("PurchaseResourceShopItem failed: %v", err) + } + if receipt.OrderID == "" || receipt.TransactionID == "" || receipt.GrantID == "" || receipt.CoinSpent != 300 || receipt.Balance.AvailableAmount != 700 { + t.Fatalf("resource shop purchase receipt mismatch: %+v", receipt) + } + if receipt.Resource.EntitlementID == "" || receipt.Resource.ResourceID != resource.ResourceID || receipt.Resource.ExpiresAtMS <= time.Now().UnixMilli() { + t.Fatalf("resource shop entitlement mismatch: %+v", receipt.Resource) + } + + again, err := svc.PurchaseResourceShopItem(ctx, resourcedomain.ResourceShopPurchaseCommand{ + CommandID: "cmd-shop-frame", + UserID: 53001, + ShopItemID: shopItems[0].ShopItemID, + }) + if err != nil { + t.Fatalf("PurchaseResourceShopItem retry failed: %v", err) + } + if again.OrderID != receipt.OrderID || again.TransactionID != receipt.TransactionID || again.Balance.AvailableAmount != receipt.Balance.AvailableAmount { + t.Fatalf("resource shop idempotency mismatch: first=%+v again=%+v", receipt, again) + } + if got := repository.CountRows("resource_shop_purchase_orders", "user_id = ?", int64(53001)); got != 1 { + t.Fatalf("resource shop order should be persisted once, got %d", got) + } + if got := repository.CountRows("wallet_transactions", "command_id = ? AND biz_type = ?", "cmd-shop-frame", "resource_shop_purchase"); got != 1 { + t.Fatalf("resource shop purchase should write one wallet transaction, got %d", got) + } + if got := repository.CountRows("wallet_entries", "transaction_id = ? AND available_delta = ?", receipt.TransactionID, int64(-300)); got != 1 { + t.Fatalf("resource shop purchase should write one debit entry, got %d", got) + } + if got := repository.CountRows("resource_grants", "grant_id = ?", receipt.GrantID); got != 1 { + t.Fatalf("resource shop purchase should write one resource grant, got %d", got) + } + if got := repository.CountRows("user_resource_entitlements", "user_id = ? AND resource_id = ?", int64(53001), resource.ResourceID); got != 1 { + t.Fatalf("resource shop purchase should grant one entitlement, got %d", got) + } +} + func TestProjectPendingBadgeGrantEventsRelaysWalletOutbox(t *testing.T) { repository := mysqltest.NewRepository(t) activity := &fakeActivityBadgeClient{status: "consumed"} @@ -1620,6 +1698,20 @@ func TestEquipUserResourceRequiresActiveEquipableEntitlement(t *testing.T) { if equipped.EntitlementID == "" || equipped.EntitlementID != grant.Items[0].EntitlementID { t.Fatalf("equipped entitlement mismatch: equipped=%+v grant=%+v", equipped, grant) } + if !equipped.Equipped { + t.Fatalf("equip response should mark entitlement as equipped: %+v", equipped) + } + resources, err := svc.ListUserResources(ctx, resourcedomain.ListUserResourcesQuery{ + UserID: 43001, + ResourceType: resourcedomain.TypeBadge, + ActiveOnly: true, + }) + if err != nil { + t.Fatalf("list user resources failed: %v", err) + } + if len(resources) != 1 || !resources[0].Equipped || resources[0].EntitlementID != equipped.EntitlementID { + t.Fatalf("resource list should expose equipped entitlement: resources=%+v equipped=%+v", resources, equipped) + } repeated, err := svc.EquipUserResource(ctx, resourcedomain.EquipUserResourceCommand{ UserID: 43001, ResourceID: badgeResource.ResourceID, diff --git a/services/wallet-service/internal/storage/mysql/resource_repository.go b/services/wallet-service/internal/storage/mysql/resource_repository.go index 844f9fd5..43f96ff0 100644 --- a/services/wallet-service/internal/storage/mysql/resource_repository.go +++ b/services/wallet-service/internal/storage/mysql/resource_repository.go @@ -19,8 +19,9 @@ import ( ) const ( - bizTypeResourceGrant = "resource_grant" - resourceOutboxAsset = "RESOURCE" + bizTypeResourceGrant = "resource_grant" + bizTypeResourceShopPurchase = "resource_shop_purchase" + resourceOutboxAsset = "RESOURCE" ) type scanTarget interface { @@ -899,6 +900,7 @@ func (r *Repository) EquipUserResource(ctx context.Context, command resourcedoma if err := tx.Commit(); err != nil { return resourcedomain.UserResourceEntitlement{}, err } + entitlement.Equipped = true return entitlement, nil } @@ -1088,6 +1090,146 @@ func (r *Repository) SetResourceShopItemStatus(ctx context.Context, command reso return r.getResourceShopItem(ctx, command.ShopItemID) } +// PurchaseResourceShopItem 是 App 道具商店的唯一购买入口;扣金币、写订单和发资源权益必须共享同一事务。 +func (r *Repository) PurchaseResourceShopItem(ctx context.Context, command resourcedomain.ResourceShopPurchaseCommand) (resourcedomain.ResourceShopPurchaseReceipt, error) { + if r == nil || r.db == nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, xerr.New(xerr.Unavailable, "mysql repository is not configured") + } + ctx = contextWithCommandApp(ctx, command.AppCode) + command.AppCode = appcode.FromContext(ctx) + command.CommandID = strings.TrimSpace(command.CommandID) + + tx, err := r.db.BeginTx(ctx, nil) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + defer func() { _ = tx.Rollback() }() + + requestHash := resourceShopPurchaseRequestHash(command) + if txRow, exists, err := r.lookupTransaction(ctx, tx, command.CommandID, requestHash, bizTypeResourceShopPurchase); err != nil || exists { + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + return r.resourceShopPurchaseReceiptForTransaction(ctx, tx, txRow.TransactionID, command.UserID) + } + + nowMs := time.Now().UnixMilli() + item, err := r.getResourceShopItemTx(ctx, tx, command.ShopItemID, true) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if err := validatePurchasableResourceShopItem(item, nowMs); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + account, err := r.lockAccount(ctx, tx, command.UserID, ledger.AssetCoin, false, nowMs) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if account.AvailableAmount < item.CoinPrice { + return resourcedomain.ResourceShopPurchaseReceipt{}, xerr.New(xerr.InsufficientBalance, "insufficient balance") + } + + transactionID := transactionID(command.AppCode, command.CommandID) + orderID := "rshop_order_" + stableHash(command.AppCode+"|"+command.CommandID) + grantID := resourceGrantID(command.AppCode, command.CommandID) + durationMS := int64(item.DurationDays) * 24 * int64(time.Hour/time.Millisecond) + coinBalanceAfter := account.AvailableAmount - item.CoinPrice + metadata := map[string]any{ + "app_code": command.AppCode, + "order_id": orderID, + "user_id": command.UserID, + "shop_item_id": item.ShopItemID, + "resource_id": item.ResourceID, + "resource_code": item.Resource.ResourceCode, + "resource_type": item.Resource.ResourceType, + "duration_days": item.DurationDays, + "duration_ms": durationMS, + "price_type": item.PriceType, + "coin_spent": item.CoinPrice, + "balance_after": coinBalanceAfter, + "resource_grant_id": grantID, + } + if err := r.insertTransaction(ctx, tx, transactionID, command.CommandID, bizTypeResourceShopPurchase, requestHash, orderID, metadata, nowMs); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if err := r.applyAccountDelta(ctx, tx, account, -item.CoinPrice, 0, nowMs); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if err := r.insertEntry(ctx, tx, walletEntry{ + TransactionID: transactionID, + UserID: command.UserID, + AssetType: ledger.AssetCoin, + AvailableDelta: -item.CoinPrice, + FrozenDelta: 0, + AvailableAfter: coinBalanceAfter, + FrozenAfter: account.FrozenAmount, + CreatedAtMS: nowMs, + }); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if err := r.insertResourceGrant(ctx, tx, grantID, command.CommandID, command.UserID, resourcedomain.GrantSourceResourceShop, resourcedomain.GrantSubjectResource, fmt.Sprintf("%d", item.ResourceID), requestHash, "", "resource shop purchase", command.UserID, nowMs); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + grantItem, err := r.applyGrantItem(ctx, tx, grantID, command.CommandID, command.UserID, item.Resource, 1, durationMS, nowMs) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if grantItem.EntitlementID == "" { + // 道具商店只出售权益类资源;如果配置成钱包入账资源,必须阻断而不是产生无背包道具的订单。 + return resourcedomain.ResourceShopPurchaseReceipt{}, xerr.New(xerr.InvalidArgument, "resource shop item must grant entitlement") + } + if _, err := tx.ExecContext(ctx, ` + INSERT INTO resource_shop_purchase_orders ( + app_code, order_id, command_id, user_id, shop_item_id, resource_id, duration_days, price_coin, + status, wallet_transaction_id, resource_grant_id, entitlement_id, request_hash, created_at_ms, updated_at_ms + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'succeeded', ?, ?, ?, ?, ?, ?)`, + command.AppCode, orderID, command.CommandID, command.UserID, item.ShopItemID, item.ResourceID, item.DurationDays, item.CoinPrice, + transactionID, grantID, grantItem.EntitlementID, requestHash, nowMs, nowMs, + ); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + resource, err := r.getUserResourceEntitlementTx(ctx, tx, grantItem.EntitlementID) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if err := r.insertWalletOutbox(ctx, tx, []walletOutboxEvent{ + balanceChangedEvent(transactionID, command.CommandID, command.UserID, ledger.AssetCoin, -item.CoinPrice, 0, coinBalanceAfter, account.FrozenAmount, account.Version+1, metadata, nowMs), + resourceOutboxEvent("ResourceGranted", command.CommandID, command.UserID, item.ResourceID, map[string]any{"grant_id": grantID, "resource": item.Resource, "source": resourcedomain.GrantSourceResourceShop}, nowMs), + { + EventID: eventID(transactionID, "ResourceShopItemPurchased", command.UserID, resourceOutboxAsset), + EventType: "ResourceShopItemPurchased", + TransactionID: transactionID, + CommandID: command.CommandID, + UserID: command.UserID, + AssetType: resourceOutboxAsset, + Payload: metadata, + CreatedAtMS: nowMs, + }, + }); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if err := tx.Commit(); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + + return resourcedomain.ResourceShopPurchaseReceipt{ + OrderID: orderID, + TransactionID: transactionID, + ShopItem: item, + Resource: resource, + Balance: ledger.AssetBalance{ + AppCode: command.AppCode, + UserID: command.UserID, + AssetType: ledger.AssetCoin, + AvailableAmount: coinBalanceAfter, + FrozenAmount: account.FrozenAmount, + Version: account.Version + 1, + }, + CoinSpent: item.CoinPrice, + GrantID: grantID, + }, nil +} + func (r *Repository) GetResourceGrant(ctx context.Context, grantID string) (resourcedomain.ResourceGrant, error) { if r == nil || r.db == nil { return resourcedomain.ResourceGrant{}, xerr.New(xerr.Unavailable, "mysql repository is not configured") @@ -1725,6 +1867,60 @@ func (r *Repository) getResourceShopItemWithQuerier(ctx context.Context, querier return item, err } +func (r *Repository) getUserResourceEntitlementTx(ctx context.Context, tx *sql.Tx, entitlementID string) (resourcedomain.UserResourceEntitlement, error) { + item, err := scanUserResourceEntitlement(tx.QueryRowContext(ctx, + userResourceSelectSQL()+` WHERE e.app_code = ? AND e.entitlement_id = ?`, + appcode.FromContext(ctx), entitlementID, + )) + if errors.Is(err, sql.ErrNoRows) { + return resourcedomain.UserResourceEntitlement{}, xerr.New(xerr.NotFound, "user resource entitlement not found") + } + return item, err +} + +func (r *Repository) resourceShopPurchaseReceiptForTransaction(ctx context.Context, tx *sql.Tx, transactionID string, userID int64) (resourcedomain.ResourceShopPurchaseReceipt, error) { + var orderID string + var shopItemID int64 + var priceCoin int64 + var grantID string + var entitlementID string + err := tx.QueryRowContext(ctx, ` + SELECT order_id, shop_item_id, price_coin, resource_grant_id, entitlement_id + FROM resource_shop_purchase_orders + WHERE app_code = ? AND wallet_transaction_id = ? AND user_id = ?`, + appcode.FromContext(ctx), transactionID, userID, + ).Scan(&orderID, &shopItemID, &priceCoin, &grantID, &entitlementID) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + item, err := r.getResourceShopItemTx(ctx, tx, shopItemID, false) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + resource, err := r.getUserResourceEntitlementTx(ctx, tx, entitlementID) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + balance, err := r.balanceAfterTransaction(ctx, tx, transactionID, userID, ledger.AssetCoin) + if err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } + if account, exists, err := r.queryAccountForUpdate(ctx, tx, userID, ledger.AssetCoin); err != nil { + return resourcedomain.ResourceShopPurchaseReceipt{}, err + } else if exists { + balance.Version = account.Version + } + return resourcedomain.ResourceShopPurchaseReceipt{ + OrderID: orderID, + TransactionID: transactionID, + ShopItem: item, + Resource: resource, + Balance: balance, + CoinSpent: priceCoin, + GrantID: grantID, + }, nil +} + func (r *Repository) listResourceShopItemsByResourceIDs(ctx context.Context, resourceIDs []int64) ([]resourcedomain.ResourceShopItem, error) { resourceIDs = compactPositiveInt64s(resourceIDs) if len(resourceIDs) == 0 { @@ -2197,6 +2393,7 @@ func scanUserResourceEntitlement(scanner scanTarget) (resourcedomain.UserResourc &item.SourceGrantID, &item.CreatedAtMS, &item.UpdatedAtMS, + &item.Equipped, &resource.AppCode, &resource.ResourceID, &resource.ResourceCode, @@ -2318,9 +2515,14 @@ func userResourceSelectSQL() string { SELECT e.app_code, e.entitlement_id, e.user_id, e.resource_id, e.status, e.quantity, e.remaining_quantity, e.effective_at_ms, e.expires_at_ms, e.source_grant_id, e.created_at_ms, e.updated_at_ms, + CASE WHEN eq.entitlement_id IS NULL THEN FALSE ELSE TRUE END AS equipped, ` + resourceColumnsWithAlias("r") + ` FROM user_resource_entitlements e JOIN resources r ON r.app_code = e.app_code AND r.resource_id = e.resource_id + LEFT JOIN user_resource_equipment eq ON eq.app_code = e.app_code + AND eq.user_id = e.user_id + AND eq.resource_type = r.resource_type + AND eq.entitlement_id = e.entitlement_id ` } @@ -2641,8 +2843,8 @@ func validateResourceShopResource(resource resourcedomain.Resource) error { if !resourcedomain.ResourceTypeSellableInShop(resource.ResourceType) { return xerr.New(xerr.InvalidArgument, "resource_type cannot be sold in shop") } - if resource.Status != resourcedomain.StatusActive { - return xerr.New(xerr.Conflict, "resource is disabled") + if err := validateGrantableResource(resource); err != nil { + return err } if resourcedomain.NormalizePriceType(resource.PriceType) != resourcedomain.PriceTypeCoin || resource.CoinPrice <= 0 { return xerr.New(xerr.InvalidArgument, "resource coin price is required") @@ -2650,6 +2852,22 @@ func validateResourceShopResource(resource resourcedomain.Resource) error { return nil } +func validatePurchasableResourceShopItem(item resourcedomain.ResourceShopItem, nowMs int64) error { + if item.Status != resourcedomain.StatusActive { + return xerr.New(xerr.Conflict, "resource shop item is disabled") + } + if item.EffectiveFromMS > 0 && item.EffectiveFromMS > nowMs { + return xerr.New(xerr.Conflict, "resource shop item is not effective") + } + if item.EffectiveToMS > 0 && item.EffectiveToMS <= nowMs { + return xerr.New(xerr.Conflict, "resource shop item is expired") + } + if !resourcedomain.ValidShopDurationDays(item.DurationDays) || item.CoinPrice <= 0 { + return xerr.New(xerr.InvalidArgument, "resource shop item price is invalid") + } + return validateResourceShopResource(item.Resource) +} + func normalizeResourceGroupCommand(command resourcedomain.ResourceGroupCommand) resourcedomain.ResourceGroupCommand { command.GroupCode = strings.TrimSpace(command.GroupCode) command.Name = strings.TrimSpace(command.Name) @@ -3038,6 +3256,12 @@ func grantResourceGroupRequestHash(command resourcedomain.GrantResourceGroupComm )) } +func resourceShopPurchaseRequestHash(command resourcedomain.ResourceShopPurchaseCommand) string { + return stableHash(fmt.Sprintf("resource_shop_purchase|%s|%d|%d", + appcode.Normalize(command.AppCode), command.UserID, command.ShopItemID, + )) +} + func resourceWalletCreditHash(grantID string, resourceID int64, quantity int64) string { return stableHash(fmt.Sprintf("resource_wallet_credit|%s|%d|%d", grantID, resourceID, quantity)) } diff --git a/services/wallet-service/internal/testutil/mysqltest/mysqltest.go b/services/wallet-service/internal/testutil/mysqltest/mysqltest.go index cf10db60..ca15047b 100644 --- a/services/wallet-service/internal/testutil/mysqltest/mysqltest.go +++ b/services/wallet-service/internal/testutil/mysqltest/mysqltest.go @@ -179,7 +179,7 @@ func validateTableName(table string) string { case "wallet_transactions", "wallet_entries", "wallet_outbox", "wallet_accounts", "wallet_recharge_records", "coin_seller_stock_records", "wallet_diamond_exchange_rules", "wallet_withdrawal_requests", "vip_levels", "user_vip_memberships", "vip_purchase_orders", "user_vip_history", - "resources", "resource_groups", "resource_group_items", "gift_type_configs", "gift_configs", "gift_config_regions", "user_gift_wall", "wallet_projection_events", + "resources", "resource_groups", "resource_group_items", "resource_shop_items", "resource_shop_purchase_orders", "gift_type_configs", "gift_configs", "gift_config_regions", "user_gift_wall", "wallet_projection_events", "resource_grants", "resource_grant_items", "user_resource_entitlements", "user_resource_equipment": return table default: diff --git a/services/wallet-service/internal/transport/grpc/resource.go b/services/wallet-service/internal/transport/grpc/resource.go index 1f2e3414..2c7212e0 100644 --- a/services/wallet-service/internal/transport/grpc/resource.go +++ b/services/wallet-service/internal/transport/grpc/resource.go @@ -336,6 +336,19 @@ func (s *Server) SetResourceShopItemStatus(ctx context.Context, req *walletv1.Se return &walletv1.ResourceShopItemResponse{Item: resourceShopItemToProto(item)}, nil } +func (s *Server) PurchaseResourceShopItem(ctx context.Context, req *walletv1.PurchaseResourceShopItemRequest) (*walletv1.PurchaseResourceShopItemResponse, error) { + receipt, err := s.svc.PurchaseResourceShopItem(ctx, resourcedomain.ResourceShopPurchaseCommand{ + AppCode: req.GetAppCode(), + CommandID: req.GetCommandId(), + UserID: req.GetUserId(), + ShopItemID: req.GetShopItemId(), + }) + if err != nil { + return nil, xerr.ToGRPCError(err) + } + return resourceShopPurchaseReceiptToProto(receipt), nil +} + func resourceCommandFromCreate(req *walletv1.CreateResourceRequest) resourcedomain.ResourceCommand { return resourcedomain.ResourceCommand{ AppCode: req.GetAppCode(), @@ -550,6 +563,18 @@ func resourceShopItemToProto(item resourcedomain.ResourceShopItem) *walletv1.Res } } +func resourceShopPurchaseReceiptToProto(receipt resourcedomain.ResourceShopPurchaseReceipt) *walletv1.PurchaseResourceShopItemResponse { + return &walletv1.PurchaseResourceShopItemResponse{ + OrderId: receipt.OrderID, + TransactionId: receipt.TransactionID, + ResourceGrantId: receipt.GrantID, + ShopItem: resourceShopItemToProto(receipt.ShopItem), + Resource: userResourceToProto(receipt.Resource), + Balance: balanceToProto(receipt.Balance), + CoinSpent: receipt.CoinSpent, + } +} + func managerGrantEnabledOrDefault(value *bool) bool { if value == nil { // 新建/编辑入口如果没显式携带开关,仍按产品规则默认允许经理中心赠送。 @@ -649,6 +674,7 @@ func userResourceToProto(item resourcedomain.UserResourceEntitlement) *walletv1. SourceGrantId: item.SourceGrantID, CreatedAtMs: item.CreatedAtMS, UpdatedAtMs: item.UpdatedAtMS, + Equipped: item.Equipped, } }