活动相关
This commit is contained in:
parent
1bb1372381
commit
94a9824f68
File diff suppressed because it is too large
Load Diff
@ -72,6 +72,8 @@ message InboxMessage {
|
|||||||
int64 sent_at_ms = 11;
|
int64 sent_at_ms = 11;
|
||||||
// image_urls 是同一通知卡片的有序图片列表;image_url 保留给旧客户端作为首图兼容字段。
|
// image_urls 是同一通知卡片的有序图片列表;image_url 保留给旧客户端作为首图兼容字段。
|
||||||
repeated string image_urls = 12;
|
repeated string image_urls = 12;
|
||||||
|
// reward_items 是活动发奖的有序结构化快照;客户端不解析 body/metadata_json 猜测数量和有效天数。
|
||||||
|
repeated InboxRewardItem reward_items = 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListInboxMessagesRequest 按 section 和游标分页读取当前用户 inbox。
|
// ListInboxMessagesRequest 按 section 和游标分页读取当前用户 inbox。
|
||||||
@ -155,6 +157,8 @@ message CreateInboxMessageRequest {
|
|||||||
string metadata_json = 21;
|
string metadata_json = 21;
|
||||||
// image_urls 由 inbox owner 结构化保存,生产者不能要求客户端解析 metadata_json。
|
// image_urls 由 inbox owner 结构化保存,生产者不能要求客户端解析 metadata_json。
|
||||||
repeated string image_urls = 22;
|
repeated string image_urls = 22;
|
||||||
|
// reward_items 与 image_urls 一样由 inbox owner 写入受控 metadata,避免扩表并保持强类型输出。
|
||||||
|
repeated InboxRewardItem reward_items = 23;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateInboxMessageResponse 返回入箱结果;重复同一 producer_event_id 时 created=false。
|
// CreateInboxMessageResponse 返回入箱结果;重复同一 producer_event_id 时 created=false。
|
||||||
@ -3013,6 +3017,16 @@ message RetryActivityTemplateTaskClaimResponse {
|
|||||||
ActivityTemplateTaskClaim claim = 1;
|
ActivityTemplateTaskClaim claim = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InboxRewardItem 放在既有 message 声明之后,避免新增结构导致生成代码中历史消息索引整体漂移。
|
||||||
|
message InboxRewardItem {
|
||||||
|
// reward_type 仅使用 resource/coin;客户端据此选择远程素材预览图或当前 App 金币图。
|
||||||
|
string reward_type = 1;
|
||||||
|
string name = 2;
|
||||||
|
string image_url = 3;
|
||||||
|
int64 quantity = 4;
|
||||||
|
int64 duration_days = 5;
|
||||||
|
}
|
||||||
|
|
||||||
// ActivityService 只暴露同步查询,不把事件消费伪装成 RPC。
|
// ActivityService 只暴露同步查询,不把事件消费伪装成 RPC。
|
||||||
service ActivityService {
|
service ActivityService {
|
||||||
rpc PingActivity(PingActivityRequest) returns (PingActivityResponse);
|
rpc PingActivity(PingActivityRequest) returns (PingActivityResponse);
|
||||||
|
|||||||
@ -27433,6 +27433,66 @@ func (x *RevokeUserResourceResponse) GetResource() *UserResourceEntitlement {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetResourceGrantRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
||||||
|
AppCode string `protobuf:"bytes,2,opt,name=app_code,json=appCode,proto3" json:"app_code,omitempty"`
|
||||||
|
GrantId string `protobuf:"bytes,3,opt,name=grant_id,json=grantId,proto3" json:"grant_id,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetResourceGrantRequest) Reset() {
|
||||||
|
*x = GetResourceGrantRequest{}
|
||||||
|
mi := &file_proto_wallet_v1_wallet_proto_msgTypes[304]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetResourceGrantRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetResourceGrantRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetResourceGrantRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_wallet_v1_wallet_proto_msgTypes[304]
|
||||||
|
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 GetResourceGrantRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetResourceGrantRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_wallet_v1_wallet_proto_rawDescGZIP(), []int{304}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetResourceGrantRequest) GetRequestId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.RequestId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetResourceGrantRequest) GetAppCode() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.AppCode
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetResourceGrantRequest) GetGrantId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.GrantId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_proto_wallet_v1_wallet_proto protoreflect.FileDescriptor
|
var File_proto_wallet_v1_wallet_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_proto_wallet_v1_wallet_proto_rawDesc = "" +
|
const file_proto_wallet_v1_wallet_proto_rawDesc = "" +
|
||||||
@ -30215,12 +30275,17 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" +
|
|||||||
"\x06reason\x18\x05 \x01(\tR\x06reason\x12(\n" +
|
"\x06reason\x18\x05 \x01(\tR\x06reason\x12(\n" +
|
||||||
"\x10operator_user_id\x18\x06 \x01(\x03R\x0eoperatorUserId\"b\n" +
|
"\x10operator_user_id\x18\x06 \x01(\x03R\x0eoperatorUserId\"b\n" +
|
||||||
"\x1aRevokeUserResourceResponse\x12D\n" +
|
"\x1aRevokeUserResourceResponse\x12D\n" +
|
||||||
"\bresource\x18\x01 \x01(\v2(.hyapp.wallet.v1.UserResourceEntitlementR\bresource2\xf4\x03\n" +
|
"\bresource\x18\x01 \x01(\v2(.hyapp.wallet.v1.UserResourceEntitlementR\bresource\"n\n" +
|
||||||
|
"\x17GetResourceGrantRequest\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"request_id\x18\x01 \x01(\tR\trequestId\x12\x19\n" +
|
||||||
|
"\bapp_code\x18\x02 \x01(\tR\aappCode\x12\x19\n" +
|
||||||
|
"\bgrant_id\x18\x03 \x01(\tR\agrantId2\xf4\x03\n" +
|
||||||
"\x11WalletCronService\x12n\n" +
|
"\x11WalletCronService\x12n\n" +
|
||||||
"%ProcessHostSalaryDailySettlementBatch\x12!.hyapp.wallet.v1.CronBatchRequest\x1a\".hyapp.wallet.v1.CronBatchResponse\x12r\n" +
|
"%ProcessHostSalaryDailySettlementBatch\x12!.hyapp.wallet.v1.CronBatchRequest\x1a\".hyapp.wallet.v1.CronBatchResponse\x12r\n" +
|
||||||
")ProcessHostSalaryHalfMonthSettlementBatch\x12!.hyapp.wallet.v1.CronBatchRequest\x1a\".hyapp.wallet.v1.CronBatchResponse\x12g\n" +
|
")ProcessHostSalaryHalfMonthSettlementBatch\x12!.hyapp.wallet.v1.CronBatchRequest\x1a\".hyapp.wallet.v1.CronBatchResponse\x12g\n" +
|
||||||
"\x1eProcessHostSalaryMonthEndBatch\x12!.hyapp.wallet.v1.CronBatchRequest\x1a\".hyapp.wallet.v1.CronBatchResponse\x12\x91\x01\n" +
|
"\x1eProcessHostSalaryMonthEndBatch\x12!.hyapp.wallet.v1.CronBatchRequest\x1a\".hyapp.wallet.v1.CronBatchResponse\x12\x91\x01\n" +
|
||||||
"\x1eProcessVipDailyCoinRebateBatch\x126.hyapp.wallet.v1.ProcessVipDailyCoinRebateBatchRequest\x1a7.hyapp.wallet.v1.ProcessVipDailyCoinRebateBatchResponse2\xdbu\n" +
|
"\x1eProcessVipDailyCoinRebateBatch\x126.hyapp.wallet.v1.ProcessVipDailyCoinRebateBatchRequest\x1a7.hyapp.wallet.v1.ProcessVipDailyCoinRebateBatchResponse2\xc1v\n" +
|
||||||
"\rWalletService\x12R\n" +
|
"\rWalletService\x12R\n" +
|
||||||
"\tDebitGift\x12!.hyapp.wallet.v1.DebitGiftRequest\x1a\".hyapp.wallet.v1.DebitGiftResponse\x12^\n" +
|
"\tDebitGift\x12!.hyapp.wallet.v1.DebitGiftRequest\x1a\".hyapp.wallet.v1.DebitGiftResponse\x12^\n" +
|
||||||
"\x0fDebitDirectGift\x12'.hyapp.wallet.v1.DebitDirectGiftRequest\x1a\".hyapp.wallet.v1.DebitGiftResponse\x12a\n" +
|
"\x0fDebitDirectGift\x12'.hyapp.wallet.v1.DebitDirectGiftRequest\x1a\".hyapp.wallet.v1.DebitGiftResponse\x12a\n" +
|
||||||
@ -30272,7 +30337,8 @@ const file_proto_wallet_v1_wallet_proto_rawDesc = "" +
|
|||||||
"\x14UpsertGiftTypeConfig\x12,.hyapp.wallet.v1.UpsertGiftTypeConfigRequest\x1a'.hyapp.wallet.v1.GiftTypeConfigResponse\x12^\n" +
|
"\x14UpsertGiftTypeConfig\x12,.hyapp.wallet.v1.UpsertGiftTypeConfigRequest\x1a'.hyapp.wallet.v1.GiftTypeConfigResponse\x12^\n" +
|
||||||
"\rGrantResource\x12%.hyapp.wallet.v1.GrantResourceRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12h\n" +
|
"\rGrantResource\x12%.hyapp.wallet.v1.GrantResourceRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12h\n" +
|
||||||
"\x12GrantResourceGroup\x12*.hyapp.wallet.v1.GrantResourceGroupRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12t\n" +
|
"\x12GrantResourceGroup\x12*.hyapp.wallet.v1.GrantResourceGroupRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12t\n" +
|
||||||
"\x18GrantPinnedResourceGroup\x120.hyapp.wallet.v1.GrantPinnedResourceGroupRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12j\n" +
|
"\x18GrantPinnedResourceGroup\x120.hyapp.wallet.v1.GrantPinnedResourceGroupRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12d\n" +
|
||||||
|
"\x10GetResourceGrant\x12(.hyapp.wallet.v1.GetResourceGrantRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12j\n" +
|
||||||
"\x13RevokeResourceGrant\x12+.hyapp.wallet.v1.RevokeResourceGrantRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12m\n" +
|
"\x13RevokeResourceGrant\x12+.hyapp.wallet.v1.RevokeResourceGrantRequest\x1a&.hyapp.wallet.v1.ResourceGrantResponse\x12m\n" +
|
||||||
"\x12RevokeUserResource\x12*.hyapp.wallet.v1.RevokeUserResourceRequest\x1a+.hyapp.wallet.v1.RevokeUserResourceResponse\x12j\n" +
|
"\x12RevokeUserResource\x12*.hyapp.wallet.v1.RevokeUserResourceRequest\x1a+.hyapp.wallet.v1.RevokeUserResourceResponse\x12j\n" +
|
||||||
"\x11ListUserResources\x12).hyapp.wallet.v1.ListUserResourcesRequest\x1a*.hyapp.wallet.v1.ListUserResourcesResponse\x12j\n" +
|
"\x11ListUserResources\x12).hyapp.wallet.v1.ListUserResourcesRequest\x1a*.hyapp.wallet.v1.ListUserResourcesResponse\x12j\n" +
|
||||||
@ -30364,7 +30430,7 @@ func file_proto_wallet_v1_wallet_proto_rawDescGZIP() []byte {
|
|||||||
return file_proto_wallet_v1_wallet_proto_rawDescData
|
return file_proto_wallet_v1_wallet_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_proto_wallet_v1_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 305)
|
var file_proto_wallet_v1_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 306)
|
||||||
var file_proto_wallet_v1_wallet_proto_goTypes = []any{
|
var file_proto_wallet_v1_wallet_proto_goTypes = []any{
|
||||||
(*DebitGiftRequest)(nil), // 0: hyapp.wallet.v1.DebitGiftRequest
|
(*DebitGiftRequest)(nil), // 0: hyapp.wallet.v1.DebitGiftRequest
|
||||||
(*DebitDirectGiftRequest)(nil), // 1: hyapp.wallet.v1.DebitDirectGiftRequest
|
(*DebitDirectGiftRequest)(nil), // 1: hyapp.wallet.v1.DebitDirectGiftRequest
|
||||||
@ -30670,7 +30736,8 @@ var file_proto_wallet_v1_wallet_proto_goTypes = []any{
|
|||||||
(*VipBenefitPresentation)(nil), // 301: hyapp.wallet.v1.VipBenefitPresentation
|
(*VipBenefitPresentation)(nil), // 301: hyapp.wallet.v1.VipBenefitPresentation
|
||||||
(*RevokeUserResourceRequest)(nil), // 302: hyapp.wallet.v1.RevokeUserResourceRequest
|
(*RevokeUserResourceRequest)(nil), // 302: hyapp.wallet.v1.RevokeUserResourceRequest
|
||||||
(*RevokeUserResourceResponse)(nil), // 303: hyapp.wallet.v1.RevokeUserResourceResponse
|
(*RevokeUserResourceResponse)(nil), // 303: hyapp.wallet.v1.RevokeUserResourceResponse
|
||||||
nil, // 304: hyapp.wallet.v1.HandleV5PayNotifyRequest.FieldsEntry
|
(*GetResourceGrantRequest)(nil), // 304: hyapp.wallet.v1.GetResourceGrantRequest
|
||||||
|
nil, // 305: hyapp.wallet.v1.HandleV5PayNotifyRequest.FieldsEntry
|
||||||
}
|
}
|
||||||
var file_proto_wallet_v1_wallet_proto_depIdxs = []int32{
|
var file_proto_wallet_v1_wallet_proto_depIdxs = []int32{
|
||||||
3, // 0: hyapp.wallet.v1.BatchDebitGiftRequest.targets:type_name -> hyapp.wallet.v1.DebitGiftTarget
|
3, // 0: hyapp.wallet.v1.BatchDebitGiftRequest.targets:type_name -> hyapp.wallet.v1.DebitGiftTarget
|
||||||
@ -30755,7 +30822,7 @@ var file_proto_wallet_v1_wallet_proto_depIdxs = []int32{
|
|||||||
157, // 79: hyapp.wallet.v1.H5RechargeOptionsResponse.payment_methods:type_name -> hyapp.wallet.v1.ThirdPartyPaymentMethod
|
157, // 79: hyapp.wallet.v1.H5RechargeOptionsResponse.payment_methods:type_name -> hyapp.wallet.v1.ThirdPartyPaymentMethod
|
||||||
169, // 80: hyapp.wallet.v1.ListTemporaryRechargeOrdersResponse.orders:type_name -> hyapp.wallet.v1.ExternalRechargeOrder
|
169, // 80: hyapp.wallet.v1.ListTemporaryRechargeOrdersResponse.orders:type_name -> hyapp.wallet.v1.ExternalRechargeOrder
|
||||||
169, // 81: hyapp.wallet.v1.H5RechargeOrderResponse.order:type_name -> hyapp.wallet.v1.ExternalRechargeOrder
|
169, // 81: hyapp.wallet.v1.H5RechargeOrderResponse.order:type_name -> hyapp.wallet.v1.ExternalRechargeOrder
|
||||||
304, // 82: hyapp.wallet.v1.HandleV5PayNotifyRequest.fields:type_name -> hyapp.wallet.v1.HandleV5PayNotifyRequest.FieldsEntry
|
305, // 82: hyapp.wallet.v1.HandleV5PayNotifyRequest.fields:type_name -> hyapp.wallet.v1.HandleV5PayNotifyRequest.FieldsEntry
|
||||||
184, // 83: hyapp.wallet.v1.GetDiamondExchangeConfigResponse.rules:type_name -> hyapp.wallet.v1.DiamondExchangeRule
|
184, // 83: hyapp.wallet.v1.GetDiamondExchangeConfigResponse.rules:type_name -> hyapp.wallet.v1.DiamondExchangeRule
|
||||||
189, // 84: hyapp.wallet.v1.ListWalletTransactionsResponse.transactions:type_name -> hyapp.wallet.v1.WalletTransaction
|
189, // 84: hyapp.wallet.v1.ListWalletTransactionsResponse.transactions:type_name -> hyapp.wallet.v1.WalletTransaction
|
||||||
301, // 85: hyapp.wallet.v1.VipBenefit.presentation:type_name -> hyapp.wallet.v1.VipBenefitPresentation
|
301, // 85: hyapp.wallet.v1.VipBenefit.presentation:type_name -> hyapp.wallet.v1.VipBenefitPresentation
|
||||||
@ -30889,219 +30956,221 @@ var file_proto_wallet_v1_wallet_proto_depIdxs = []int32{
|
|||||||
93, // 213: hyapp.wallet.v1.WalletService.GrantResource:input_type -> hyapp.wallet.v1.GrantResourceRequest
|
93, // 213: hyapp.wallet.v1.WalletService.GrantResource:input_type -> hyapp.wallet.v1.GrantResourceRequest
|
||||||
94, // 214: hyapp.wallet.v1.WalletService.GrantResourceGroup:input_type -> hyapp.wallet.v1.GrantResourceGroupRequest
|
94, // 214: hyapp.wallet.v1.WalletService.GrantResourceGroup:input_type -> hyapp.wallet.v1.GrantResourceGroupRequest
|
||||||
95, // 215: hyapp.wallet.v1.WalletService.GrantPinnedResourceGroup:input_type -> hyapp.wallet.v1.GrantPinnedResourceGroupRequest
|
95, // 215: hyapp.wallet.v1.WalletService.GrantPinnedResourceGroup:input_type -> hyapp.wallet.v1.GrantPinnedResourceGroupRequest
|
||||||
96, // 216: hyapp.wallet.v1.WalletService.RevokeResourceGrant:input_type -> hyapp.wallet.v1.RevokeResourceGrantRequest
|
304, // 216: hyapp.wallet.v1.WalletService.GetResourceGrant:input_type -> hyapp.wallet.v1.GetResourceGrantRequest
|
||||||
302, // 217: hyapp.wallet.v1.WalletService.RevokeUserResource:input_type -> hyapp.wallet.v1.RevokeUserResourceRequest
|
96, // 217: hyapp.wallet.v1.WalletService.RevokeResourceGrant:input_type -> hyapp.wallet.v1.RevokeResourceGrantRequest
|
||||||
98, // 218: hyapp.wallet.v1.WalletService.ListUserResources:input_type -> hyapp.wallet.v1.ListUserResourcesRequest
|
302, // 218: hyapp.wallet.v1.WalletService.RevokeUserResource:input_type -> hyapp.wallet.v1.RevokeUserResourceRequest
|
||||||
100, // 219: hyapp.wallet.v1.WalletService.EquipUserResource:input_type -> hyapp.wallet.v1.EquipUserResourceRequest
|
98, // 219: hyapp.wallet.v1.WalletService.ListUserResources:input_type -> hyapp.wallet.v1.ListUserResourcesRequest
|
||||||
102, // 220: hyapp.wallet.v1.WalletService.UnequipUserResource:input_type -> hyapp.wallet.v1.UnequipUserResourceRequest
|
100, // 220: hyapp.wallet.v1.WalletService.EquipUserResource:input_type -> hyapp.wallet.v1.EquipUserResourceRequest
|
||||||
104, // 221: hyapp.wallet.v1.WalletService.BatchGetUserEquippedResources:input_type -> hyapp.wallet.v1.BatchGetUserEquippedResourcesRequest
|
102, // 221: hyapp.wallet.v1.WalletService.UnequipUserResource:input_type -> hyapp.wallet.v1.UnequipUserResourceRequest
|
||||||
107, // 222: hyapp.wallet.v1.WalletService.ListResourceGrants:input_type -> hyapp.wallet.v1.ListResourceGrantsRequest
|
104, // 222: hyapp.wallet.v1.WalletService.BatchGetUserEquippedResources:input_type -> hyapp.wallet.v1.BatchGetUserEquippedResourcesRequest
|
||||||
110, // 223: hyapp.wallet.v1.WalletService.ListResourceShopItems:input_type -> hyapp.wallet.v1.ListResourceShopItemsRequest
|
107, // 223: hyapp.wallet.v1.WalletService.ListResourceGrants:input_type -> hyapp.wallet.v1.ListResourceGrantsRequest
|
||||||
112, // 224: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:input_type -> hyapp.wallet.v1.UpsertResourceShopItemsRequest
|
110, // 224: hyapp.wallet.v1.WalletService.ListResourceShopItems:input_type -> hyapp.wallet.v1.ListResourceShopItemsRequest
|
||||||
114, // 225: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:input_type -> hyapp.wallet.v1.SetResourceShopItemStatusRequest
|
112, // 225: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:input_type -> hyapp.wallet.v1.UpsertResourceShopItemsRequest
|
||||||
280, // 226: hyapp.wallet.v1.WalletService.ListResourceShopPurchaseOrders:input_type -> hyapp.wallet.v1.ListResourceShopPurchaseOrdersRequest
|
114, // 226: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:input_type -> hyapp.wallet.v1.SetResourceShopItemStatusRequest
|
||||||
116, // 227: hyapp.wallet.v1.WalletService.PurchaseResourceShopItem:input_type -> hyapp.wallet.v1.PurchaseResourceShopItemRequest
|
280, // 227: hyapp.wallet.v1.WalletService.ListResourceShopPurchaseOrders:input_type -> hyapp.wallet.v1.ListResourceShopPurchaseOrdersRequest
|
||||||
119, // 228: hyapp.wallet.v1.WalletService.ListRechargeBills:input_type -> hyapp.wallet.v1.ListRechargeBillsRequest
|
116, // 228: hyapp.wallet.v1.WalletService.PurchaseResourceShopItem:input_type -> hyapp.wallet.v1.PurchaseResourceShopItemRequest
|
||||||
121, // 229: hyapp.wallet.v1.WalletService.GetRechargeBillSummary:input_type -> hyapp.wallet.v1.GetRechargeBillSummaryRequest
|
119, // 229: hyapp.wallet.v1.WalletService.ListRechargeBills:input_type -> hyapp.wallet.v1.ListRechargeBillsRequest
|
||||||
125, // 230: hyapp.wallet.v1.WalletService.BatchGetUserRechargeStats:input_type -> hyapp.wallet.v1.BatchGetUserRechargeStatsRequest
|
121, // 230: hyapp.wallet.v1.WalletService.GetRechargeBillSummary:input_type -> hyapp.wallet.v1.GetRechargeBillSummaryRequest
|
||||||
127, // 231: hyapp.wallet.v1.WalletService.GetRechargeBillOverview:input_type -> hyapp.wallet.v1.GetRechargeBillOverviewRequest
|
125, // 231: hyapp.wallet.v1.WalletService.BatchGetUserRechargeStats:input_type -> hyapp.wallet.v1.BatchGetUserRechargeStatsRequest
|
||||||
133, // 232: hyapp.wallet.v1.WalletService.RefreshGooglePaymentPrices:input_type -> hyapp.wallet.v1.RefreshGooglePaymentPricesRequest
|
127, // 232: hyapp.wallet.v1.WalletService.GetRechargeBillOverview:input_type -> hyapp.wallet.v1.GetRechargeBillOverviewRequest
|
||||||
137, // 233: hyapp.wallet.v1.WalletService.GetWalletOverview:input_type -> hyapp.wallet.v1.GetWalletOverviewRequest
|
133, // 233: hyapp.wallet.v1.WalletService.RefreshGooglePaymentPrices:input_type -> hyapp.wallet.v1.RefreshGooglePaymentPricesRequest
|
||||||
140, // 234: hyapp.wallet.v1.WalletService.GetWalletValueSummary:input_type -> hyapp.wallet.v1.GetWalletValueSummaryRequest
|
137, // 234: hyapp.wallet.v1.WalletService.GetWalletOverview:input_type -> hyapp.wallet.v1.GetWalletOverviewRequest
|
||||||
143, // 235: hyapp.wallet.v1.WalletService.GetUserGiftWall:input_type -> hyapp.wallet.v1.GetUserGiftWallRequest
|
140, // 235: hyapp.wallet.v1.WalletService.GetWalletValueSummary:input_type -> hyapp.wallet.v1.GetWalletValueSummaryRequest
|
||||||
146, // 236: hyapp.wallet.v1.WalletService.ListRechargeProducts:input_type -> hyapp.wallet.v1.ListRechargeProductsRequest
|
143, // 236: hyapp.wallet.v1.WalletService.GetUserGiftWall:input_type -> hyapp.wallet.v1.GetUserGiftWallRequest
|
||||||
148, // 237: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:input_type -> hyapp.wallet.v1.ConfirmGooglePaymentRequest
|
146, // 237: hyapp.wallet.v1.WalletService.ListRechargeProducts:input_type -> hyapp.wallet.v1.ListRechargeProductsRequest
|
||||||
150, // 238: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:input_type -> hyapp.wallet.v1.ListAdminRechargeProductsRequest
|
148, // 238: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:input_type -> hyapp.wallet.v1.ConfirmGooglePaymentRequest
|
||||||
152, // 239: hyapp.wallet.v1.WalletService.CreateRechargeProduct:input_type -> hyapp.wallet.v1.CreateRechargeProductRequest
|
150, // 239: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:input_type -> hyapp.wallet.v1.ListAdminRechargeProductsRequest
|
||||||
153, // 240: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:input_type -> hyapp.wallet.v1.UpdateRechargeProductRequest
|
152, // 240: hyapp.wallet.v1.WalletService.CreateRechargeProduct:input_type -> hyapp.wallet.v1.CreateRechargeProductRequest
|
||||||
154, // 241: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:input_type -> hyapp.wallet.v1.DeleteRechargeProductRequest
|
153, // 241: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:input_type -> hyapp.wallet.v1.UpdateRechargeProductRequest
|
||||||
159, // 242: hyapp.wallet.v1.WalletService.ListThirdPartyPaymentChannels:input_type -> hyapp.wallet.v1.ListThirdPartyPaymentChannelsRequest
|
154, // 242: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:input_type -> hyapp.wallet.v1.DeleteRechargeProductRequest
|
||||||
161, // 243: hyapp.wallet.v1.WalletService.SetThirdPartyPaymentMethodStatus:input_type -> hyapp.wallet.v1.SetThirdPartyPaymentMethodStatusRequest
|
159, // 243: hyapp.wallet.v1.WalletService.ListThirdPartyPaymentChannels:input_type -> hyapp.wallet.v1.ListThirdPartyPaymentChannelsRequest
|
||||||
163, // 244: hyapp.wallet.v1.WalletService.UpdateThirdPartyPaymentRate:input_type -> hyapp.wallet.v1.UpdateThirdPartyPaymentRateRequest
|
161, // 244: hyapp.wallet.v1.WalletService.SetThirdPartyPaymentMethodStatus:input_type -> hyapp.wallet.v1.SetThirdPartyPaymentMethodStatusRequest
|
||||||
165, // 245: hyapp.wallet.v1.WalletService.SyncThirdPartyPaymentMethods:input_type -> hyapp.wallet.v1.SyncThirdPartyPaymentMethodsRequest
|
163, // 245: hyapp.wallet.v1.WalletService.UpdateThirdPartyPaymentRate:input_type -> hyapp.wallet.v1.UpdateThirdPartyPaymentRateRequest
|
||||||
167, // 246: hyapp.wallet.v1.WalletService.ListH5RechargeOptions:input_type -> hyapp.wallet.v1.H5RechargeOptionsRequest
|
165, // 246: hyapp.wallet.v1.WalletService.SyncThirdPartyPaymentMethods:input_type -> hyapp.wallet.v1.SyncThirdPartyPaymentMethodsRequest
|
||||||
170, // 247: hyapp.wallet.v1.WalletService.CreateH5RechargeOrder:input_type -> hyapp.wallet.v1.CreateH5RechargeOrderRequest
|
167, // 247: hyapp.wallet.v1.WalletService.ListH5RechargeOptions:input_type -> hyapp.wallet.v1.H5RechargeOptionsRequest
|
||||||
171, // 248: hyapp.wallet.v1.WalletService.CreateTemporaryRechargeOrder:input_type -> hyapp.wallet.v1.CreateTemporaryRechargeOrderRequest
|
170, // 248: hyapp.wallet.v1.WalletService.CreateH5RechargeOrder:input_type -> hyapp.wallet.v1.CreateH5RechargeOrderRequest
|
||||||
172, // 249: hyapp.wallet.v1.WalletService.GetTemporaryRechargeOrder:input_type -> hyapp.wallet.v1.GetTemporaryRechargeOrderRequest
|
171, // 249: hyapp.wallet.v1.WalletService.CreateTemporaryRechargeOrder:input_type -> hyapp.wallet.v1.CreateTemporaryRechargeOrderRequest
|
||||||
173, // 250: hyapp.wallet.v1.WalletService.ListTemporaryRechargeOrders:input_type -> hyapp.wallet.v1.ListTemporaryRechargeOrdersRequest
|
172, // 250: hyapp.wallet.v1.WalletService.GetTemporaryRechargeOrder:input_type -> hyapp.wallet.v1.GetTemporaryRechargeOrderRequest
|
||||||
175, // 251: hyapp.wallet.v1.WalletService.SubmitH5RechargeTx:input_type -> hyapp.wallet.v1.SubmitH5RechargeTxRequest
|
173, // 251: hyapp.wallet.v1.WalletService.ListTemporaryRechargeOrders:input_type -> hyapp.wallet.v1.ListTemporaryRechargeOrdersRequest
|
||||||
176, // 252: hyapp.wallet.v1.WalletService.GetH5RechargeOrder:input_type -> hyapp.wallet.v1.GetH5RechargeOrderRequest
|
175, // 252: hyapp.wallet.v1.WalletService.SubmitH5RechargeTx:input_type -> hyapp.wallet.v1.SubmitH5RechargeTxRequest
|
||||||
178, // 253: hyapp.wallet.v1.WalletService.VerifyCoinSellerRechargeReceipt:input_type -> hyapp.wallet.v1.VerifyCoinSellerRechargeReceiptRequest
|
176, // 253: hyapp.wallet.v1.WalletService.GetH5RechargeOrder:input_type -> hyapp.wallet.v1.GetH5RechargeOrderRequest
|
||||||
180, // 254: hyapp.wallet.v1.WalletService.HandleMifapayNotify:input_type -> hyapp.wallet.v1.HandleMifapayNotifyRequest
|
178, // 254: hyapp.wallet.v1.WalletService.VerifyCoinSellerRechargeReceipt:input_type -> hyapp.wallet.v1.VerifyCoinSellerRechargeReceiptRequest
|
||||||
182, // 255: hyapp.wallet.v1.WalletService.HandleV5PayNotify:input_type -> hyapp.wallet.v1.HandleV5PayNotifyRequest
|
180, // 255: hyapp.wallet.v1.WalletService.HandleMifapayNotify:input_type -> hyapp.wallet.v1.HandleMifapayNotifyRequest
|
||||||
185, // 256: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:input_type -> hyapp.wallet.v1.GetDiamondExchangeConfigRequest
|
182, // 256: hyapp.wallet.v1.WalletService.HandleV5PayNotify:input_type -> hyapp.wallet.v1.HandleV5PayNotifyRequest
|
||||||
187, // 257: hyapp.wallet.v1.WalletService.ExchangePointToCoin:input_type -> hyapp.wallet.v1.ExchangePointToCoinRequest
|
185, // 257: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:input_type -> hyapp.wallet.v1.GetDiamondExchangeConfigRequest
|
||||||
190, // 258: hyapp.wallet.v1.WalletService.ListWalletTransactions:input_type -> hyapp.wallet.v1.ListWalletTransactionsRequest
|
187, // 258: hyapp.wallet.v1.WalletService.ExchangePointToCoin:input_type -> hyapp.wallet.v1.ExchangePointToCoinRequest
|
||||||
190, // 259: hyapp.wallet.v1.WalletService.ListHostPeriodDiamondTransactions:input_type -> hyapp.wallet.v1.ListWalletTransactionsRequest
|
190, // 259: hyapp.wallet.v1.WalletService.ListWalletTransactions:input_type -> hyapp.wallet.v1.ListWalletTransactionsRequest
|
||||||
200, // 260: hyapp.wallet.v1.WalletService.ListVipPackages:input_type -> hyapp.wallet.v1.ListVipPackagesRequest
|
190, // 260: hyapp.wallet.v1.WalletService.ListHostPeriodDiamondTransactions:input_type -> hyapp.wallet.v1.ListWalletTransactionsRequest
|
||||||
215, // 261: hyapp.wallet.v1.WalletService.GetVipProgramConfig:input_type -> hyapp.wallet.v1.GetVipProgramConfigRequest
|
200, // 261: hyapp.wallet.v1.WalletService.ListVipPackages:input_type -> hyapp.wallet.v1.ListVipPackagesRequest
|
||||||
202, // 262: hyapp.wallet.v1.WalletService.GetMyVip:input_type -> hyapp.wallet.v1.GetMyVipRequest
|
215, // 262: hyapp.wallet.v1.WalletService.GetVipProgramConfig:input_type -> hyapp.wallet.v1.GetVipProgramConfigRequest
|
||||||
205, // 263: hyapp.wallet.v1.WalletService.BatchGetUserEffectiveVipLevels:input_type -> hyapp.wallet.v1.BatchGetUserEffectiveVipLevelsRequest
|
202, // 263: hyapp.wallet.v1.WalletService.GetMyVip:input_type -> hyapp.wallet.v1.GetMyVipRequest
|
||||||
237, // 264: hyapp.wallet.v1.WalletService.CheckVipBenefit:input_type -> hyapp.wallet.v1.CheckVipBenefitRequest
|
205, // 264: hyapp.wallet.v1.WalletService.BatchGetUserEffectiveVipLevels:input_type -> hyapp.wallet.v1.BatchGetUserEffectiveVipLevelsRequest
|
||||||
207, // 265: hyapp.wallet.v1.WalletService.PurchaseVip:input_type -> hyapp.wallet.v1.PurchaseVipRequest
|
237, // 265: hyapp.wallet.v1.WalletService.CheckVipBenefit:input_type -> hyapp.wallet.v1.CheckVipBenefitRequest
|
||||||
209, // 266: hyapp.wallet.v1.WalletService.DebitCPBreakupFee:input_type -> hyapp.wallet.v1.DebitCPBreakupFeeRequest
|
207, // 266: hyapp.wallet.v1.WalletService.PurchaseVip:input_type -> hyapp.wallet.v1.PurchaseVipRequest
|
||||||
211, // 267: hyapp.wallet.v1.WalletService.DebitWheelDraw:input_type -> hyapp.wallet.v1.DebitWheelDrawRequest
|
209, // 267: hyapp.wallet.v1.WalletService.DebitCPBreakupFee:input_type -> hyapp.wallet.v1.DebitCPBreakupFeeRequest
|
||||||
213, // 268: hyapp.wallet.v1.WalletService.GrantVip:input_type -> hyapp.wallet.v1.GrantVipRequest
|
211, // 268: hyapp.wallet.v1.WalletService.DebitWheelDraw:input_type -> hyapp.wallet.v1.DebitWheelDrawRequest
|
||||||
231, // 269: hyapp.wallet.v1.WalletService.GrantVipTrialCard:input_type -> hyapp.wallet.v1.GrantVipTrialCardRequest
|
213, // 269: hyapp.wallet.v1.WalletService.GrantVip:input_type -> hyapp.wallet.v1.GrantVipRequest
|
||||||
233, // 270: hyapp.wallet.v1.WalletService.EquipVipTrialCard:input_type -> hyapp.wallet.v1.EquipVipTrialCardRequest
|
231, // 270: hyapp.wallet.v1.WalletService.GrantVipTrialCard:input_type -> hyapp.wallet.v1.GrantVipTrialCardRequest
|
||||||
235, // 271: hyapp.wallet.v1.WalletService.UnequipVipTrialCard:input_type -> hyapp.wallet.v1.UnequipVipTrialCardRequest
|
233, // 271: hyapp.wallet.v1.WalletService.EquipVipTrialCard:input_type -> hyapp.wallet.v1.EquipVipTrialCardRequest
|
||||||
240, // 272: hyapp.wallet.v1.WalletService.ListAdminVipLevels:input_type -> hyapp.wallet.v1.ListAdminVipLevelsRequest
|
235, // 272: hyapp.wallet.v1.WalletService.UnequipVipTrialCard:input_type -> hyapp.wallet.v1.UnequipVipTrialCardRequest
|
||||||
242, // 273: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:input_type -> hyapp.wallet.v1.UpdateAdminVipLevelsRequest
|
240, // 273: hyapp.wallet.v1.WalletService.ListAdminVipLevels:input_type -> hyapp.wallet.v1.ListAdminVipLevelsRequest
|
||||||
217, // 274: hyapp.wallet.v1.WalletService.UpdateAdminVipProgramConfig:input_type -> hyapp.wallet.v1.UpdateAdminVipProgramConfigRequest
|
242, // 274: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:input_type -> hyapp.wallet.v1.UpdateAdminVipLevelsRequest
|
||||||
219, // 275: hyapp.wallet.v1.WalletService.UpdateMyVipSettings:input_type -> hyapp.wallet.v1.UpdateMyVipSettingsRequest
|
217, // 275: hyapp.wallet.v1.WalletService.UpdateAdminVipProgramConfig:input_type -> hyapp.wallet.v1.UpdateAdminVipProgramConfigRequest
|
||||||
225, // 276: hyapp.wallet.v1.WalletService.GetMyCurrentVipDailyCoinRebate:input_type -> hyapp.wallet.v1.GetMyCurrentVipDailyCoinRebateRequest
|
219, // 276: hyapp.wallet.v1.WalletService.UpdateMyVipSettings:input_type -> hyapp.wallet.v1.UpdateMyVipSettingsRequest
|
||||||
227, // 277: hyapp.wallet.v1.WalletService.ListMyVipDailyCoinRebateStatuses:input_type -> hyapp.wallet.v1.ListMyVipDailyCoinRebateStatusesRequest
|
225, // 277: hyapp.wallet.v1.WalletService.GetMyCurrentVipDailyCoinRebate:input_type -> hyapp.wallet.v1.GetMyCurrentVipDailyCoinRebateRequest
|
||||||
229, // 278: hyapp.wallet.v1.WalletService.ClaimVipDailyCoinRebate:input_type -> hyapp.wallet.v1.ClaimVipDailyCoinRebateRequest
|
227, // 278: hyapp.wallet.v1.WalletService.ListMyVipDailyCoinRebateStatuses:input_type -> hyapp.wallet.v1.ListMyVipDailyCoinRebateStatusesRequest
|
||||||
244, // 279: hyapp.wallet.v1.WalletService.CreditTaskReward:input_type -> hyapp.wallet.v1.CreditTaskRewardRequest
|
229, // 279: hyapp.wallet.v1.WalletService.ClaimVipDailyCoinRebate:input_type -> hyapp.wallet.v1.ClaimVipDailyCoinRebateRequest
|
||||||
246, // 280: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:input_type -> hyapp.wallet.v1.CreditLuckyGiftRewardRequest
|
244, // 280: hyapp.wallet.v1.WalletService.CreditTaskReward:input_type -> hyapp.wallet.v1.CreditTaskRewardRequest
|
||||||
248, // 281: hyapp.wallet.v1.WalletService.CreditWheelReward:input_type -> hyapp.wallet.v1.CreditWheelRewardRequest
|
246, // 281: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:input_type -> hyapp.wallet.v1.CreditLuckyGiftRewardRequest
|
||||||
250, // 282: hyapp.wallet.v1.WalletService.CreditRoomTurnoverReward:input_type -> hyapp.wallet.v1.CreditRoomTurnoverRewardRequest
|
248, // 282: hyapp.wallet.v1.WalletService.CreditWheelReward:input_type -> hyapp.wallet.v1.CreditWheelRewardRequest
|
||||||
252, // 283: hyapp.wallet.v1.WalletService.CreditInviteActivityReward:input_type -> hyapp.wallet.v1.CreditInviteActivityRewardRequest
|
250, // 283: hyapp.wallet.v1.WalletService.CreditRoomTurnoverReward:input_type -> hyapp.wallet.v1.CreditRoomTurnoverRewardRequest
|
||||||
254, // 284: hyapp.wallet.v1.WalletService.CreditAgencyOpeningReward:input_type -> hyapp.wallet.v1.CreditAgencyOpeningRewardRequest
|
252, // 284: hyapp.wallet.v1.WalletService.CreditInviteActivityReward:input_type -> hyapp.wallet.v1.CreditInviteActivityRewardRequest
|
||||||
256, // 285: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:input_type -> hyapp.wallet.v1.ApplyGameCoinChangeRequest
|
254, // 285: hyapp.wallet.v1.WalletService.CreditAgencyOpeningReward:input_type -> hyapp.wallet.v1.CreditAgencyOpeningRewardRequest
|
||||||
261, // 286: hyapp.wallet.v1.WalletService.GetRedPacketConfig:input_type -> hyapp.wallet.v1.GetRedPacketConfigRequest
|
256, // 286: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:input_type -> hyapp.wallet.v1.ApplyGameCoinChangeRequest
|
||||||
263, // 287: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:input_type -> hyapp.wallet.v1.UpdateRedPacketConfigRequest
|
261, // 287: hyapp.wallet.v1.WalletService.GetRedPacketConfig:input_type -> hyapp.wallet.v1.GetRedPacketConfigRequest
|
||||||
265, // 288: hyapp.wallet.v1.WalletService.CreateRedPacket:input_type -> hyapp.wallet.v1.CreateRedPacketRequest
|
263, // 288: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:input_type -> hyapp.wallet.v1.UpdateRedPacketConfigRequest
|
||||||
267, // 289: hyapp.wallet.v1.WalletService.ClaimRedPacket:input_type -> hyapp.wallet.v1.ClaimRedPacketRequest
|
265, // 289: hyapp.wallet.v1.WalletService.CreateRedPacket:input_type -> hyapp.wallet.v1.CreateRedPacketRequest
|
||||||
269, // 290: hyapp.wallet.v1.WalletService.ListRedPackets:input_type -> hyapp.wallet.v1.ListRedPacketsRequest
|
267, // 290: hyapp.wallet.v1.WalletService.ClaimRedPacket:input_type -> hyapp.wallet.v1.ClaimRedPacketRequest
|
||||||
271, // 291: hyapp.wallet.v1.WalletService.GetRedPacket:input_type -> hyapp.wallet.v1.GetRedPacketRequest
|
269, // 291: hyapp.wallet.v1.WalletService.ListRedPackets:input_type -> hyapp.wallet.v1.ListRedPacketsRequest
|
||||||
273, // 292: hyapp.wallet.v1.WalletService.ExpireRedPackets:input_type -> hyapp.wallet.v1.ExpireRedPacketsRequest
|
271, // 292: hyapp.wallet.v1.WalletService.GetRedPacket:input_type -> hyapp.wallet.v1.GetRedPacketRequest
|
||||||
275, // 293: hyapp.wallet.v1.WalletService.RetryRedPacketRefund:input_type -> hyapp.wallet.v1.RetryRedPacketRefundRequest
|
273, // 293: hyapp.wallet.v1.WalletService.ExpireRedPackets:input_type -> hyapp.wallet.v1.ExpireRedPacketsRequest
|
||||||
278, // 294: hyapp.wallet.v1.WalletCronService.ProcessHostSalaryDailySettlementBatch:output_type -> hyapp.wallet.v1.CronBatchResponse
|
275, // 294: hyapp.wallet.v1.WalletService.RetryRedPacketRefund:input_type -> hyapp.wallet.v1.RetryRedPacketRefundRequest
|
||||||
278, // 295: hyapp.wallet.v1.WalletCronService.ProcessHostSalaryHalfMonthSettlementBatch:output_type -> hyapp.wallet.v1.CronBatchResponse
|
278, // 295: hyapp.wallet.v1.WalletCronService.ProcessHostSalaryDailySettlementBatch:output_type -> hyapp.wallet.v1.CronBatchResponse
|
||||||
278, // 296: hyapp.wallet.v1.WalletCronService.ProcessHostSalaryMonthEndBatch:output_type -> hyapp.wallet.v1.CronBatchResponse
|
278, // 296: hyapp.wallet.v1.WalletCronService.ProcessHostSalaryHalfMonthSettlementBatch:output_type -> hyapp.wallet.v1.CronBatchResponse
|
||||||
224, // 297: hyapp.wallet.v1.WalletCronService.ProcessVipDailyCoinRebateBatch:output_type -> hyapp.wallet.v1.ProcessVipDailyCoinRebateBatchResponse
|
278, // 297: hyapp.wallet.v1.WalletCronService.ProcessHostSalaryMonthEndBatch:output_type -> hyapp.wallet.v1.CronBatchResponse
|
||||||
2, // 298: hyapp.wallet.v1.WalletService.DebitGift:output_type -> hyapp.wallet.v1.DebitGiftResponse
|
224, // 298: hyapp.wallet.v1.WalletCronService.ProcessVipDailyCoinRebateBatch:output_type -> hyapp.wallet.v1.ProcessVipDailyCoinRebateBatchResponse
|
||||||
2, // 299: hyapp.wallet.v1.WalletService.DebitDirectGift:output_type -> hyapp.wallet.v1.DebitGiftResponse
|
2, // 299: hyapp.wallet.v1.WalletService.DebitGift:output_type -> hyapp.wallet.v1.DebitGiftResponse
|
||||||
6, // 300: hyapp.wallet.v1.WalletService.BatchDebitGift:output_type -> hyapp.wallet.v1.BatchDebitGiftResponse
|
2, // 300: hyapp.wallet.v1.WalletService.DebitDirectGift:output_type -> hyapp.wallet.v1.DebitGiftResponse
|
||||||
2, // 301: hyapp.wallet.v1.WalletService.DebitRobotGift:output_type -> hyapp.wallet.v1.DebitGiftResponse
|
6, // 301: hyapp.wallet.v1.WalletService.BatchDebitGift:output_type -> hyapp.wallet.v1.BatchDebitGiftResponse
|
||||||
10, // 302: hyapp.wallet.v1.WalletService.GetBalances:output_type -> hyapp.wallet.v1.GetBalancesResponse
|
2, // 302: hyapp.wallet.v1.WalletService.DebitRobotGift:output_type -> hyapp.wallet.v1.DebitGiftResponse
|
||||||
14, // 303: hyapp.wallet.v1.WalletService.GetActiveHostSalaryPolicy:output_type -> hyapp.wallet.v1.GetActiveHostSalaryPolicyResponse
|
10, // 303: hyapp.wallet.v1.WalletService.GetBalances:output_type -> hyapp.wallet.v1.GetBalancesResponse
|
||||||
17, // 304: hyapp.wallet.v1.WalletService.GetHostSalaryProgress:output_type -> hyapp.wallet.v1.GetHostSalaryProgressResponse
|
14, // 304: hyapp.wallet.v1.WalletService.GetActiveHostSalaryPolicy:output_type -> hyapp.wallet.v1.GetActiveHostSalaryPolicyResponse
|
||||||
286, // 305: hyapp.wallet.v1.WalletService.GetHostRevenueStats:output_type -> hyapp.wallet.v1.GetHostRevenueStatsResponse
|
17, // 305: hyapp.wallet.v1.WalletService.GetHostSalaryProgress:output_type -> hyapp.wallet.v1.GetHostSalaryProgressResponse
|
||||||
289, // 306: hyapp.wallet.v1.WalletService.GetAgencyHostGiftStats:output_type -> hyapp.wallet.v1.GetAgencyHostGiftStatsResponse
|
286, // 306: hyapp.wallet.v1.WalletService.GetHostRevenueStats:output_type -> hyapp.wallet.v1.GetHostRevenueStatsResponse
|
||||||
20, // 307: hyapp.wallet.v1.WalletService.GetTeamHostSalaryStats:output_type -> hyapp.wallet.v1.GetTeamHostSalaryStatsResponse
|
289, // 307: hyapp.wallet.v1.WalletService.GetAgencyHostGiftStats:output_type -> hyapp.wallet.v1.GetAgencyHostGiftStatsResponse
|
||||||
22, // 308: hyapp.wallet.v1.WalletService.AdminCreditAsset:output_type -> hyapp.wallet.v1.AdminCreditAssetResponse
|
20, // 308: hyapp.wallet.v1.WalletService.GetTeamHostSalaryStats:output_type -> hyapp.wallet.v1.GetTeamHostSalaryStatsResponse
|
||||||
24, // 309: hyapp.wallet.v1.WalletService.AdminCreditCoinSellerStock:output_type -> hyapp.wallet.v1.AdminCreditCoinSellerStockResponse
|
22, // 309: hyapp.wallet.v1.WalletService.AdminCreditAsset:output_type -> hyapp.wallet.v1.AdminCreditAssetResponse
|
||||||
26, // 310: hyapp.wallet.v1.WalletService.TransferCoinFromSeller:output_type -> hyapp.wallet.v1.TransferCoinFromSellerResponse
|
24, // 310: hyapp.wallet.v1.WalletService.AdminCreditCoinSellerStock:output_type -> hyapp.wallet.v1.AdminCreditCoinSellerStockResponse
|
||||||
28, // 311: hyapp.wallet.v1.WalletService.TransferCoinSellerStockToChild:output_type -> hyapp.wallet.v1.TransferCoinSellerStockToChildResponse
|
26, // 311: hyapp.wallet.v1.WalletService.TransferCoinFromSeller:output_type -> hyapp.wallet.v1.TransferCoinFromSellerResponse
|
||||||
31, // 312: hyapp.wallet.v1.WalletService.ListCoinSellerSalaryExchangeRateTiers:output_type -> hyapp.wallet.v1.ListCoinSellerSalaryExchangeRateTiersResponse
|
28, // 312: hyapp.wallet.v1.WalletService.TransferCoinSellerStockToChild:output_type -> hyapp.wallet.v1.TransferCoinSellerStockToChildResponse
|
||||||
33, // 313: hyapp.wallet.v1.WalletService.ExchangeSalaryToCoin:output_type -> hyapp.wallet.v1.ExchangeSalaryToCoinResponse
|
31, // 313: hyapp.wallet.v1.WalletService.ListCoinSellerSalaryExchangeRateTiers:output_type -> hyapp.wallet.v1.ListCoinSellerSalaryExchangeRateTiersResponse
|
||||||
35, // 314: hyapp.wallet.v1.WalletService.TransferSalaryToCoinSeller:output_type -> hyapp.wallet.v1.TransferSalaryToCoinSellerResponse
|
33, // 314: hyapp.wallet.v1.WalletService.ExchangeSalaryToCoin:output_type -> hyapp.wallet.v1.ExchangeSalaryToCoinResponse
|
||||||
293, // 315: hyapp.wallet.v1.WalletService.ListPointWithdrawalCoinSellers:output_type -> hyapp.wallet.v1.ListPointWithdrawalCoinSellersResponse
|
35, // 315: hyapp.wallet.v1.WalletService.TransferSalaryToCoinSeller:output_type -> hyapp.wallet.v1.TransferSalaryToCoinSellerResponse
|
||||||
295, // 316: hyapp.wallet.v1.WalletService.TransferPointToCoinSeller:output_type -> hyapp.wallet.v1.TransferPointToCoinSellerResponse
|
293, // 316: hyapp.wallet.v1.WalletService.ListPointWithdrawalCoinSellers:output_type -> hyapp.wallet.v1.ListPointWithdrawalCoinSellersResponse
|
||||||
298, // 317: hyapp.wallet.v1.WalletService.GetPointWithdrawalConfig:output_type -> hyapp.wallet.v1.GetPointWithdrawalConfigResponse
|
295, // 317: hyapp.wallet.v1.WalletService.TransferPointToCoinSeller:output_type -> hyapp.wallet.v1.TransferPointToCoinSellerResponse
|
||||||
37, // 318: hyapp.wallet.v1.WalletService.FreezeSalaryWithdrawal:output_type -> hyapp.wallet.v1.FreezeSalaryWithdrawalResponse
|
298, // 318: hyapp.wallet.v1.WalletService.GetPointWithdrawalConfig:output_type -> hyapp.wallet.v1.GetPointWithdrawalConfigResponse
|
||||||
39, // 319: hyapp.wallet.v1.WalletService.SettleSalaryWithdrawal:output_type -> hyapp.wallet.v1.SettleSalaryWithdrawalResponse
|
37, // 319: hyapp.wallet.v1.WalletService.FreezeSalaryWithdrawal:output_type -> hyapp.wallet.v1.FreezeSalaryWithdrawalResponse
|
||||||
41, // 320: hyapp.wallet.v1.WalletService.ReleaseSalaryWithdrawal:output_type -> hyapp.wallet.v1.ReleaseSalaryWithdrawalResponse
|
39, // 320: hyapp.wallet.v1.WalletService.SettleSalaryWithdrawal:output_type -> hyapp.wallet.v1.SettleSalaryWithdrawalResponse
|
||||||
43, // 321: hyapp.wallet.v1.WalletService.FreezePointWithdrawal:output_type -> hyapp.wallet.v1.FreezePointWithdrawalResponse
|
41, // 321: hyapp.wallet.v1.WalletService.ReleaseSalaryWithdrawal:output_type -> hyapp.wallet.v1.ReleaseSalaryWithdrawalResponse
|
||||||
45, // 322: hyapp.wallet.v1.WalletService.SettlePointWithdrawal:output_type -> hyapp.wallet.v1.SettlePointWithdrawalResponse
|
43, // 322: hyapp.wallet.v1.WalletService.FreezePointWithdrawal:output_type -> hyapp.wallet.v1.FreezePointWithdrawalResponse
|
||||||
47, // 323: hyapp.wallet.v1.WalletService.ReleasePointWithdrawal:output_type -> hyapp.wallet.v1.ReleasePointWithdrawalResponse
|
45, // 323: hyapp.wallet.v1.WalletService.SettlePointWithdrawal:output_type -> hyapp.wallet.v1.SettlePointWithdrawalResponse
|
||||||
62, // 324: hyapp.wallet.v1.WalletService.ListResources:output_type -> hyapp.wallet.v1.ListResourcesResponse
|
47, // 324: hyapp.wallet.v1.WalletService.ReleasePointWithdrawal:output_type -> hyapp.wallet.v1.ReleasePointWithdrawalResponse
|
||||||
64, // 325: hyapp.wallet.v1.WalletService.GetResource:output_type -> hyapp.wallet.v1.GetResourceResponse
|
62, // 325: hyapp.wallet.v1.WalletService.ListResources:output_type -> hyapp.wallet.v1.ListResourcesResponse
|
||||||
71, // 326: hyapp.wallet.v1.WalletService.CreateResource:output_type -> hyapp.wallet.v1.ResourceResponse
|
64, // 326: hyapp.wallet.v1.WalletService.GetResource:output_type -> hyapp.wallet.v1.GetResourceResponse
|
||||||
71, // 327: hyapp.wallet.v1.WalletService.UpdateResource:output_type -> hyapp.wallet.v1.ResourceResponse
|
71, // 327: hyapp.wallet.v1.WalletService.CreateResource:output_type -> hyapp.wallet.v1.ResourceResponse
|
||||||
71, // 328: hyapp.wallet.v1.WalletService.SetResourceStatus:output_type -> hyapp.wallet.v1.ResourceResponse
|
71, // 328: hyapp.wallet.v1.WalletService.UpdateResource:output_type -> hyapp.wallet.v1.ResourceResponse
|
||||||
71, // 329: hyapp.wallet.v1.WalletService.DeleteResource:output_type -> hyapp.wallet.v1.ResourceResponse
|
71, // 329: hyapp.wallet.v1.WalletService.SetResourceStatus:output_type -> hyapp.wallet.v1.ResourceResponse
|
||||||
70, // 330: hyapp.wallet.v1.WalletService.BatchDeleteResources:output_type -> hyapp.wallet.v1.BatchDeleteResourcesResponse
|
71, // 330: hyapp.wallet.v1.WalletService.DeleteResource:output_type -> hyapp.wallet.v1.ResourceResponse
|
||||||
73, // 331: hyapp.wallet.v1.WalletService.ListResourceGroups:output_type -> hyapp.wallet.v1.ListResourceGroupsResponse
|
70, // 331: hyapp.wallet.v1.WalletService.BatchDeleteResources:output_type -> hyapp.wallet.v1.BatchDeleteResourcesResponse
|
||||||
75, // 332: hyapp.wallet.v1.WalletService.GetResourceGroup:output_type -> hyapp.wallet.v1.GetResourceGroupResponse
|
73, // 332: hyapp.wallet.v1.WalletService.ListResourceGroups:output_type -> hyapp.wallet.v1.ListResourceGroupsResponse
|
||||||
79, // 333: hyapp.wallet.v1.WalletService.CreateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse
|
75, // 333: hyapp.wallet.v1.WalletService.GetResourceGroup:output_type -> hyapp.wallet.v1.GetResourceGroupResponse
|
||||||
79, // 334: hyapp.wallet.v1.WalletService.UpdateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse
|
79, // 334: hyapp.wallet.v1.WalletService.CreateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse
|
||||||
79, // 335: hyapp.wallet.v1.WalletService.SetResourceGroupStatus:output_type -> hyapp.wallet.v1.ResourceGroupResponse
|
79, // 335: hyapp.wallet.v1.WalletService.UpdateResourceGroup:output_type -> hyapp.wallet.v1.ResourceGroupResponse
|
||||||
53, // 336: hyapp.wallet.v1.WalletService.PinResourceGroupSnapshot:output_type -> hyapp.wallet.v1.PinResourceGroupSnapshotResponse
|
79, // 336: hyapp.wallet.v1.WalletService.SetResourceGroupStatus:output_type -> hyapp.wallet.v1.ResourceGroupResponse
|
||||||
81, // 337: hyapp.wallet.v1.WalletService.ListGiftConfigs:output_type -> hyapp.wallet.v1.ListGiftConfigsResponse
|
53, // 337: hyapp.wallet.v1.WalletService.PinResourceGroupSnapshot:output_type -> hyapp.wallet.v1.PinResourceGroupSnapshotResponse
|
||||||
83, // 338: hyapp.wallet.v1.WalletService.ListGiftTypeConfigs:output_type -> hyapp.wallet.v1.ListGiftTypeConfigsResponse
|
81, // 338: hyapp.wallet.v1.WalletService.ListGiftConfigs:output_type -> hyapp.wallet.v1.ListGiftConfigsResponse
|
||||||
283, // 339: hyapp.wallet.v1.WalletService.GetGiftCatalogVersion:output_type -> hyapp.wallet.v1.GetGiftCatalogVersionResponse
|
83, // 339: hyapp.wallet.v1.WalletService.ListGiftTypeConfigs:output_type -> hyapp.wallet.v1.ListGiftTypeConfigsResponse
|
||||||
92, // 340: hyapp.wallet.v1.WalletService.CreateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
283, // 340: hyapp.wallet.v1.WalletService.GetGiftCatalogVersion:output_type -> hyapp.wallet.v1.GetGiftCatalogVersionResponse
|
||||||
88, // 341: hyapp.wallet.v1.WalletService.BatchCreateGiftConfigs:output_type -> hyapp.wallet.v1.BatchCreateGiftConfigsResponse
|
92, // 341: hyapp.wallet.v1.WalletService.CreateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
||||||
92, // 342: hyapp.wallet.v1.WalletService.UpdateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
88, // 342: hyapp.wallet.v1.WalletService.BatchCreateGiftConfigs:output_type -> hyapp.wallet.v1.BatchCreateGiftConfigsResponse
|
||||||
92, // 343: hyapp.wallet.v1.WalletService.SetGiftConfigStatus:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
92, // 343: hyapp.wallet.v1.WalletService.UpdateGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
||||||
92, // 344: hyapp.wallet.v1.WalletService.DeleteGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
92, // 344: hyapp.wallet.v1.WalletService.SetGiftConfigStatus:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
||||||
85, // 345: hyapp.wallet.v1.WalletService.UpsertGiftTypeConfig:output_type -> hyapp.wallet.v1.GiftTypeConfigResponse
|
92, // 345: hyapp.wallet.v1.WalletService.DeleteGiftConfig:output_type -> hyapp.wallet.v1.GiftConfigResponse
|
||||||
97, // 346: hyapp.wallet.v1.WalletService.GrantResource:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
85, // 346: hyapp.wallet.v1.WalletService.UpsertGiftTypeConfig:output_type -> hyapp.wallet.v1.GiftTypeConfigResponse
|
||||||
97, // 347: hyapp.wallet.v1.WalletService.GrantResourceGroup:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
97, // 347: hyapp.wallet.v1.WalletService.GrantResource:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
||||||
97, // 348: hyapp.wallet.v1.WalletService.GrantPinnedResourceGroup:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
97, // 348: hyapp.wallet.v1.WalletService.GrantResourceGroup:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
||||||
97, // 349: hyapp.wallet.v1.WalletService.RevokeResourceGrant:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
97, // 349: hyapp.wallet.v1.WalletService.GrantPinnedResourceGroup:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
||||||
303, // 350: hyapp.wallet.v1.WalletService.RevokeUserResource:output_type -> hyapp.wallet.v1.RevokeUserResourceResponse
|
97, // 350: hyapp.wallet.v1.WalletService.GetResourceGrant:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
||||||
99, // 351: hyapp.wallet.v1.WalletService.ListUserResources:output_type -> hyapp.wallet.v1.ListUserResourcesResponse
|
97, // 351: hyapp.wallet.v1.WalletService.RevokeResourceGrant:output_type -> hyapp.wallet.v1.ResourceGrantResponse
|
||||||
101, // 352: hyapp.wallet.v1.WalletService.EquipUserResource:output_type -> hyapp.wallet.v1.EquipUserResourceResponse
|
303, // 352: hyapp.wallet.v1.WalletService.RevokeUserResource:output_type -> hyapp.wallet.v1.RevokeUserResourceResponse
|
||||||
103, // 353: hyapp.wallet.v1.WalletService.UnequipUserResource:output_type -> hyapp.wallet.v1.UnequipUserResourceResponse
|
99, // 353: hyapp.wallet.v1.WalletService.ListUserResources:output_type -> hyapp.wallet.v1.ListUserResourcesResponse
|
||||||
106, // 354: hyapp.wallet.v1.WalletService.BatchGetUserEquippedResources:output_type -> hyapp.wallet.v1.BatchGetUserEquippedResourcesResponse
|
101, // 354: hyapp.wallet.v1.WalletService.EquipUserResource:output_type -> hyapp.wallet.v1.EquipUserResourceResponse
|
||||||
108, // 355: hyapp.wallet.v1.WalletService.ListResourceGrants:output_type -> hyapp.wallet.v1.ListResourceGrantsResponse
|
103, // 355: hyapp.wallet.v1.WalletService.UnequipUserResource:output_type -> hyapp.wallet.v1.UnequipUserResourceResponse
|
||||||
111, // 356: hyapp.wallet.v1.WalletService.ListResourceShopItems:output_type -> hyapp.wallet.v1.ListResourceShopItemsResponse
|
106, // 356: hyapp.wallet.v1.WalletService.BatchGetUserEquippedResources:output_type -> hyapp.wallet.v1.BatchGetUserEquippedResourcesResponse
|
||||||
113, // 357: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:output_type -> hyapp.wallet.v1.UpsertResourceShopItemsResponse
|
108, // 357: hyapp.wallet.v1.WalletService.ListResourceGrants:output_type -> hyapp.wallet.v1.ListResourceGrantsResponse
|
||||||
115, // 358: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:output_type -> hyapp.wallet.v1.ResourceShopItemResponse
|
111, // 358: hyapp.wallet.v1.WalletService.ListResourceShopItems:output_type -> hyapp.wallet.v1.ListResourceShopItemsResponse
|
||||||
281, // 359: hyapp.wallet.v1.WalletService.ListResourceShopPurchaseOrders:output_type -> hyapp.wallet.v1.ListResourceShopPurchaseOrdersResponse
|
113, // 359: hyapp.wallet.v1.WalletService.UpsertResourceShopItems:output_type -> hyapp.wallet.v1.UpsertResourceShopItemsResponse
|
||||||
117, // 360: hyapp.wallet.v1.WalletService.PurchaseResourceShopItem:output_type -> hyapp.wallet.v1.PurchaseResourceShopItemResponse
|
115, // 360: hyapp.wallet.v1.WalletService.SetResourceShopItemStatus:output_type -> hyapp.wallet.v1.ResourceShopItemResponse
|
||||||
120, // 361: hyapp.wallet.v1.WalletService.ListRechargeBills:output_type -> hyapp.wallet.v1.ListRechargeBillsResponse
|
281, // 361: hyapp.wallet.v1.WalletService.ListResourceShopPurchaseOrders:output_type -> hyapp.wallet.v1.ListResourceShopPurchaseOrdersResponse
|
||||||
123, // 362: hyapp.wallet.v1.WalletService.GetRechargeBillSummary:output_type -> hyapp.wallet.v1.GetRechargeBillSummaryResponse
|
117, // 362: hyapp.wallet.v1.WalletService.PurchaseResourceShopItem:output_type -> hyapp.wallet.v1.PurchaseResourceShopItemResponse
|
||||||
126, // 363: hyapp.wallet.v1.WalletService.BatchGetUserRechargeStats:output_type -> hyapp.wallet.v1.BatchGetUserRechargeStatsResponse
|
120, // 363: hyapp.wallet.v1.WalletService.ListRechargeBills:output_type -> hyapp.wallet.v1.ListRechargeBillsResponse
|
||||||
132, // 364: hyapp.wallet.v1.WalletService.GetRechargeBillOverview:output_type -> hyapp.wallet.v1.GetRechargeBillOverviewResponse
|
123, // 364: hyapp.wallet.v1.WalletService.GetRechargeBillSummary:output_type -> hyapp.wallet.v1.GetRechargeBillSummaryResponse
|
||||||
135, // 365: hyapp.wallet.v1.WalletService.RefreshGooglePaymentPrices:output_type -> hyapp.wallet.v1.RefreshGooglePaymentPricesResponse
|
126, // 365: hyapp.wallet.v1.WalletService.BatchGetUserRechargeStats:output_type -> hyapp.wallet.v1.BatchGetUserRechargeStatsResponse
|
||||||
138, // 366: hyapp.wallet.v1.WalletService.GetWalletOverview:output_type -> hyapp.wallet.v1.GetWalletOverviewResponse
|
132, // 366: hyapp.wallet.v1.WalletService.GetRechargeBillOverview:output_type -> hyapp.wallet.v1.GetRechargeBillOverviewResponse
|
||||||
141, // 367: hyapp.wallet.v1.WalletService.GetWalletValueSummary:output_type -> hyapp.wallet.v1.GetWalletValueSummaryResponse
|
135, // 367: hyapp.wallet.v1.WalletService.RefreshGooglePaymentPrices:output_type -> hyapp.wallet.v1.RefreshGooglePaymentPricesResponse
|
||||||
144, // 368: hyapp.wallet.v1.WalletService.GetUserGiftWall:output_type -> hyapp.wallet.v1.GetUserGiftWallResponse
|
138, // 368: hyapp.wallet.v1.WalletService.GetWalletOverview:output_type -> hyapp.wallet.v1.GetWalletOverviewResponse
|
||||||
147, // 369: hyapp.wallet.v1.WalletService.ListRechargeProducts:output_type -> hyapp.wallet.v1.ListRechargeProductsResponse
|
141, // 369: hyapp.wallet.v1.WalletService.GetWalletValueSummary:output_type -> hyapp.wallet.v1.GetWalletValueSummaryResponse
|
||||||
149, // 370: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:output_type -> hyapp.wallet.v1.ConfirmGooglePaymentResponse
|
144, // 370: hyapp.wallet.v1.WalletService.GetUserGiftWall:output_type -> hyapp.wallet.v1.GetUserGiftWallResponse
|
||||||
151, // 371: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:output_type -> hyapp.wallet.v1.ListAdminRechargeProductsResponse
|
147, // 371: hyapp.wallet.v1.WalletService.ListRechargeProducts:output_type -> hyapp.wallet.v1.ListRechargeProductsResponse
|
||||||
155, // 372: hyapp.wallet.v1.WalletService.CreateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse
|
149, // 372: hyapp.wallet.v1.WalletService.ConfirmGooglePayment:output_type -> hyapp.wallet.v1.ConfirmGooglePaymentResponse
|
||||||
155, // 373: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse
|
151, // 373: hyapp.wallet.v1.WalletService.ListAdminRechargeProducts:output_type -> hyapp.wallet.v1.ListAdminRechargeProductsResponse
|
||||||
156, // 374: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:output_type -> hyapp.wallet.v1.DeleteRechargeProductResponse
|
155, // 374: hyapp.wallet.v1.WalletService.CreateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse
|
||||||
160, // 375: hyapp.wallet.v1.WalletService.ListThirdPartyPaymentChannels:output_type -> hyapp.wallet.v1.ListThirdPartyPaymentChannelsResponse
|
155, // 375: hyapp.wallet.v1.WalletService.UpdateRechargeProduct:output_type -> hyapp.wallet.v1.RechargeProductResponse
|
||||||
162, // 376: hyapp.wallet.v1.WalletService.SetThirdPartyPaymentMethodStatus:output_type -> hyapp.wallet.v1.ThirdPartyPaymentMethodResponse
|
156, // 376: hyapp.wallet.v1.WalletService.DeleteRechargeProduct:output_type -> hyapp.wallet.v1.DeleteRechargeProductResponse
|
||||||
162, // 377: hyapp.wallet.v1.WalletService.UpdateThirdPartyPaymentRate:output_type -> hyapp.wallet.v1.ThirdPartyPaymentMethodResponse
|
160, // 377: hyapp.wallet.v1.WalletService.ListThirdPartyPaymentChannels:output_type -> hyapp.wallet.v1.ListThirdPartyPaymentChannelsResponse
|
||||||
166, // 378: hyapp.wallet.v1.WalletService.SyncThirdPartyPaymentMethods:output_type -> hyapp.wallet.v1.SyncThirdPartyPaymentMethodsResponse
|
162, // 378: hyapp.wallet.v1.WalletService.SetThirdPartyPaymentMethodStatus:output_type -> hyapp.wallet.v1.ThirdPartyPaymentMethodResponse
|
||||||
168, // 379: hyapp.wallet.v1.WalletService.ListH5RechargeOptions:output_type -> hyapp.wallet.v1.H5RechargeOptionsResponse
|
162, // 379: hyapp.wallet.v1.WalletService.UpdateThirdPartyPaymentRate:output_type -> hyapp.wallet.v1.ThirdPartyPaymentMethodResponse
|
||||||
177, // 380: hyapp.wallet.v1.WalletService.CreateH5RechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
166, // 380: hyapp.wallet.v1.WalletService.SyncThirdPartyPaymentMethods:output_type -> hyapp.wallet.v1.SyncThirdPartyPaymentMethodsResponse
|
||||||
177, // 381: hyapp.wallet.v1.WalletService.CreateTemporaryRechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
168, // 381: hyapp.wallet.v1.WalletService.ListH5RechargeOptions:output_type -> hyapp.wallet.v1.H5RechargeOptionsResponse
|
||||||
177, // 382: hyapp.wallet.v1.WalletService.GetTemporaryRechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
177, // 382: hyapp.wallet.v1.WalletService.CreateH5RechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
||||||
174, // 383: hyapp.wallet.v1.WalletService.ListTemporaryRechargeOrders:output_type -> hyapp.wallet.v1.ListTemporaryRechargeOrdersResponse
|
177, // 383: hyapp.wallet.v1.WalletService.CreateTemporaryRechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
||||||
177, // 384: hyapp.wallet.v1.WalletService.SubmitH5RechargeTx:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
177, // 384: hyapp.wallet.v1.WalletService.GetTemporaryRechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
||||||
177, // 385: hyapp.wallet.v1.WalletService.GetH5RechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
174, // 385: hyapp.wallet.v1.WalletService.ListTemporaryRechargeOrders:output_type -> hyapp.wallet.v1.ListTemporaryRechargeOrdersResponse
|
||||||
179, // 386: hyapp.wallet.v1.WalletService.VerifyCoinSellerRechargeReceipt:output_type -> hyapp.wallet.v1.VerifyCoinSellerRechargeReceiptResponse
|
177, // 386: hyapp.wallet.v1.WalletService.SubmitH5RechargeTx:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
||||||
181, // 387: hyapp.wallet.v1.WalletService.HandleMifapayNotify:output_type -> hyapp.wallet.v1.HandleMifapayNotifyResponse
|
177, // 387: hyapp.wallet.v1.WalletService.GetH5RechargeOrder:output_type -> hyapp.wallet.v1.H5RechargeOrderResponse
|
||||||
183, // 388: hyapp.wallet.v1.WalletService.HandleV5PayNotify:output_type -> hyapp.wallet.v1.HandleV5PayNotifyResponse
|
179, // 388: hyapp.wallet.v1.WalletService.VerifyCoinSellerRechargeReceipt:output_type -> hyapp.wallet.v1.VerifyCoinSellerRechargeReceiptResponse
|
||||||
186, // 389: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:output_type -> hyapp.wallet.v1.GetDiamondExchangeConfigResponse
|
181, // 389: hyapp.wallet.v1.WalletService.HandleMifapayNotify:output_type -> hyapp.wallet.v1.HandleMifapayNotifyResponse
|
||||||
188, // 390: hyapp.wallet.v1.WalletService.ExchangePointToCoin:output_type -> hyapp.wallet.v1.ExchangePointToCoinResponse
|
183, // 390: hyapp.wallet.v1.WalletService.HandleV5PayNotify:output_type -> hyapp.wallet.v1.HandleV5PayNotifyResponse
|
||||||
191, // 391: hyapp.wallet.v1.WalletService.ListWalletTransactions:output_type -> hyapp.wallet.v1.ListWalletTransactionsResponse
|
186, // 391: hyapp.wallet.v1.WalletService.GetDiamondExchangeConfig:output_type -> hyapp.wallet.v1.GetDiamondExchangeConfigResponse
|
||||||
191, // 392: hyapp.wallet.v1.WalletService.ListHostPeriodDiamondTransactions:output_type -> hyapp.wallet.v1.ListWalletTransactionsResponse
|
188, // 392: hyapp.wallet.v1.WalletService.ExchangePointToCoin:output_type -> hyapp.wallet.v1.ExchangePointToCoinResponse
|
||||||
201, // 393: hyapp.wallet.v1.WalletService.ListVipPackages:output_type -> hyapp.wallet.v1.ListVipPackagesResponse
|
191, // 393: hyapp.wallet.v1.WalletService.ListWalletTransactions:output_type -> hyapp.wallet.v1.ListWalletTransactionsResponse
|
||||||
216, // 394: hyapp.wallet.v1.WalletService.GetVipProgramConfig:output_type -> hyapp.wallet.v1.GetVipProgramConfigResponse
|
191, // 394: hyapp.wallet.v1.WalletService.ListHostPeriodDiamondTransactions:output_type -> hyapp.wallet.v1.ListWalletTransactionsResponse
|
||||||
203, // 395: hyapp.wallet.v1.WalletService.GetMyVip:output_type -> hyapp.wallet.v1.GetMyVipResponse
|
201, // 395: hyapp.wallet.v1.WalletService.ListVipPackages:output_type -> hyapp.wallet.v1.ListVipPackagesResponse
|
||||||
206, // 396: hyapp.wallet.v1.WalletService.BatchGetUserEffectiveVipLevels:output_type -> hyapp.wallet.v1.BatchGetUserEffectiveVipLevelsResponse
|
216, // 396: hyapp.wallet.v1.WalletService.GetVipProgramConfig:output_type -> hyapp.wallet.v1.GetVipProgramConfigResponse
|
||||||
238, // 397: hyapp.wallet.v1.WalletService.CheckVipBenefit:output_type -> hyapp.wallet.v1.CheckVipBenefitResponse
|
203, // 397: hyapp.wallet.v1.WalletService.GetMyVip:output_type -> hyapp.wallet.v1.GetMyVipResponse
|
||||||
208, // 398: hyapp.wallet.v1.WalletService.PurchaseVip:output_type -> hyapp.wallet.v1.PurchaseVipResponse
|
206, // 398: hyapp.wallet.v1.WalletService.BatchGetUserEffectiveVipLevels:output_type -> hyapp.wallet.v1.BatchGetUserEffectiveVipLevelsResponse
|
||||||
210, // 399: hyapp.wallet.v1.WalletService.DebitCPBreakupFee:output_type -> hyapp.wallet.v1.DebitCPBreakupFeeResponse
|
238, // 399: hyapp.wallet.v1.WalletService.CheckVipBenefit:output_type -> hyapp.wallet.v1.CheckVipBenefitResponse
|
||||||
212, // 400: hyapp.wallet.v1.WalletService.DebitWheelDraw:output_type -> hyapp.wallet.v1.DebitWheelDrawResponse
|
208, // 400: hyapp.wallet.v1.WalletService.PurchaseVip:output_type -> hyapp.wallet.v1.PurchaseVipResponse
|
||||||
214, // 401: hyapp.wallet.v1.WalletService.GrantVip:output_type -> hyapp.wallet.v1.GrantVipResponse
|
210, // 401: hyapp.wallet.v1.WalletService.DebitCPBreakupFee:output_type -> hyapp.wallet.v1.DebitCPBreakupFeeResponse
|
||||||
232, // 402: hyapp.wallet.v1.WalletService.GrantVipTrialCard:output_type -> hyapp.wallet.v1.GrantVipTrialCardResponse
|
212, // 402: hyapp.wallet.v1.WalletService.DebitWheelDraw:output_type -> hyapp.wallet.v1.DebitWheelDrawResponse
|
||||||
234, // 403: hyapp.wallet.v1.WalletService.EquipVipTrialCard:output_type -> hyapp.wallet.v1.EquipVipTrialCardResponse
|
214, // 403: hyapp.wallet.v1.WalletService.GrantVip:output_type -> hyapp.wallet.v1.GrantVipResponse
|
||||||
236, // 404: hyapp.wallet.v1.WalletService.UnequipVipTrialCard:output_type -> hyapp.wallet.v1.UnequipVipTrialCardResponse
|
232, // 404: hyapp.wallet.v1.WalletService.GrantVipTrialCard:output_type -> hyapp.wallet.v1.GrantVipTrialCardResponse
|
||||||
241, // 405: hyapp.wallet.v1.WalletService.ListAdminVipLevels:output_type -> hyapp.wallet.v1.ListAdminVipLevelsResponse
|
234, // 405: hyapp.wallet.v1.WalletService.EquipVipTrialCard:output_type -> hyapp.wallet.v1.EquipVipTrialCardResponse
|
||||||
243, // 406: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:output_type -> hyapp.wallet.v1.UpdateAdminVipLevelsResponse
|
236, // 406: hyapp.wallet.v1.WalletService.UnequipVipTrialCard:output_type -> hyapp.wallet.v1.UnequipVipTrialCardResponse
|
||||||
218, // 407: hyapp.wallet.v1.WalletService.UpdateAdminVipProgramConfig:output_type -> hyapp.wallet.v1.UpdateAdminVipProgramConfigResponse
|
241, // 407: hyapp.wallet.v1.WalletService.ListAdminVipLevels:output_type -> hyapp.wallet.v1.ListAdminVipLevelsResponse
|
||||||
220, // 408: hyapp.wallet.v1.WalletService.UpdateMyVipSettings:output_type -> hyapp.wallet.v1.UpdateMyVipSettingsResponse
|
243, // 408: hyapp.wallet.v1.WalletService.UpdateAdminVipLevels:output_type -> hyapp.wallet.v1.UpdateAdminVipLevelsResponse
|
||||||
226, // 409: hyapp.wallet.v1.WalletService.GetMyCurrentVipDailyCoinRebate:output_type -> hyapp.wallet.v1.GetMyCurrentVipDailyCoinRebateResponse
|
218, // 409: hyapp.wallet.v1.WalletService.UpdateAdminVipProgramConfig:output_type -> hyapp.wallet.v1.UpdateAdminVipProgramConfigResponse
|
||||||
228, // 410: hyapp.wallet.v1.WalletService.ListMyVipDailyCoinRebateStatuses:output_type -> hyapp.wallet.v1.ListMyVipDailyCoinRebateStatusesResponse
|
220, // 410: hyapp.wallet.v1.WalletService.UpdateMyVipSettings:output_type -> hyapp.wallet.v1.UpdateMyVipSettingsResponse
|
||||||
230, // 411: hyapp.wallet.v1.WalletService.ClaimVipDailyCoinRebate:output_type -> hyapp.wallet.v1.ClaimVipDailyCoinRebateResponse
|
226, // 411: hyapp.wallet.v1.WalletService.GetMyCurrentVipDailyCoinRebate:output_type -> hyapp.wallet.v1.GetMyCurrentVipDailyCoinRebateResponse
|
||||||
245, // 412: hyapp.wallet.v1.WalletService.CreditTaskReward:output_type -> hyapp.wallet.v1.CreditTaskRewardResponse
|
228, // 412: hyapp.wallet.v1.WalletService.ListMyVipDailyCoinRebateStatuses:output_type -> hyapp.wallet.v1.ListMyVipDailyCoinRebateStatusesResponse
|
||||||
247, // 413: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:output_type -> hyapp.wallet.v1.CreditLuckyGiftRewardResponse
|
230, // 413: hyapp.wallet.v1.WalletService.ClaimVipDailyCoinRebate:output_type -> hyapp.wallet.v1.ClaimVipDailyCoinRebateResponse
|
||||||
249, // 414: hyapp.wallet.v1.WalletService.CreditWheelReward:output_type -> hyapp.wallet.v1.CreditWheelRewardResponse
|
245, // 414: hyapp.wallet.v1.WalletService.CreditTaskReward:output_type -> hyapp.wallet.v1.CreditTaskRewardResponse
|
||||||
251, // 415: hyapp.wallet.v1.WalletService.CreditRoomTurnoverReward:output_type -> hyapp.wallet.v1.CreditRoomTurnoverRewardResponse
|
247, // 415: hyapp.wallet.v1.WalletService.CreditLuckyGiftReward:output_type -> hyapp.wallet.v1.CreditLuckyGiftRewardResponse
|
||||||
253, // 416: hyapp.wallet.v1.WalletService.CreditInviteActivityReward:output_type -> hyapp.wallet.v1.CreditInviteActivityRewardResponse
|
249, // 416: hyapp.wallet.v1.WalletService.CreditWheelReward:output_type -> hyapp.wallet.v1.CreditWheelRewardResponse
|
||||||
255, // 417: hyapp.wallet.v1.WalletService.CreditAgencyOpeningReward:output_type -> hyapp.wallet.v1.CreditAgencyOpeningRewardResponse
|
251, // 417: hyapp.wallet.v1.WalletService.CreditRoomTurnoverReward:output_type -> hyapp.wallet.v1.CreditRoomTurnoverRewardResponse
|
||||||
257, // 418: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:output_type -> hyapp.wallet.v1.ApplyGameCoinChangeResponse
|
253, // 418: hyapp.wallet.v1.WalletService.CreditInviteActivityReward:output_type -> hyapp.wallet.v1.CreditInviteActivityRewardResponse
|
||||||
262, // 419: hyapp.wallet.v1.WalletService.GetRedPacketConfig:output_type -> hyapp.wallet.v1.GetRedPacketConfigResponse
|
255, // 419: hyapp.wallet.v1.WalletService.CreditAgencyOpeningReward:output_type -> hyapp.wallet.v1.CreditAgencyOpeningRewardResponse
|
||||||
264, // 420: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:output_type -> hyapp.wallet.v1.UpdateRedPacketConfigResponse
|
257, // 420: hyapp.wallet.v1.WalletService.ApplyGameCoinChange:output_type -> hyapp.wallet.v1.ApplyGameCoinChangeResponse
|
||||||
266, // 421: hyapp.wallet.v1.WalletService.CreateRedPacket:output_type -> hyapp.wallet.v1.CreateRedPacketResponse
|
262, // 421: hyapp.wallet.v1.WalletService.GetRedPacketConfig:output_type -> hyapp.wallet.v1.GetRedPacketConfigResponse
|
||||||
268, // 422: hyapp.wallet.v1.WalletService.ClaimRedPacket:output_type -> hyapp.wallet.v1.ClaimRedPacketResponse
|
264, // 422: hyapp.wallet.v1.WalletService.UpdateRedPacketConfig:output_type -> hyapp.wallet.v1.UpdateRedPacketConfigResponse
|
||||||
270, // 423: hyapp.wallet.v1.WalletService.ListRedPackets:output_type -> hyapp.wallet.v1.ListRedPacketsResponse
|
266, // 423: hyapp.wallet.v1.WalletService.CreateRedPacket:output_type -> hyapp.wallet.v1.CreateRedPacketResponse
|
||||||
272, // 424: hyapp.wallet.v1.WalletService.GetRedPacket:output_type -> hyapp.wallet.v1.GetRedPacketResponse
|
268, // 424: hyapp.wallet.v1.WalletService.ClaimRedPacket:output_type -> hyapp.wallet.v1.ClaimRedPacketResponse
|
||||||
274, // 425: hyapp.wallet.v1.WalletService.ExpireRedPackets:output_type -> hyapp.wallet.v1.ExpireRedPacketsResponse
|
270, // 425: hyapp.wallet.v1.WalletService.ListRedPackets:output_type -> hyapp.wallet.v1.ListRedPacketsResponse
|
||||||
276, // 426: hyapp.wallet.v1.WalletService.RetryRedPacketRefund:output_type -> hyapp.wallet.v1.RetryRedPacketRefundResponse
|
272, // 426: hyapp.wallet.v1.WalletService.GetRedPacket:output_type -> hyapp.wallet.v1.GetRedPacketResponse
|
||||||
294, // [294:427] is the sub-list for method output_type
|
274, // 427: hyapp.wallet.v1.WalletService.ExpireRedPackets:output_type -> hyapp.wallet.v1.ExpireRedPacketsResponse
|
||||||
161, // [161:294] is the sub-list for method input_type
|
276, // 428: hyapp.wallet.v1.WalletService.RetryRedPacketRefund:output_type -> hyapp.wallet.v1.RetryRedPacketRefundResponse
|
||||||
|
295, // [295:429] is the sub-list for method output_type
|
||||||
|
161, // [161:295] is the sub-list for method input_type
|
||||||
161, // [161:161] is the sub-list for extension type_name
|
161, // [161:161] is the sub-list for extension type_name
|
||||||
161, // [161:161] is the sub-list for extension extendee
|
161, // [161:161] is the sub-list for extension extendee
|
||||||
0, // [0:161] is the sub-list for field type_name
|
0, // [0:161] is the sub-list for field type_name
|
||||||
@ -31124,7 +31193,7 @@ func file_proto_wallet_v1_wallet_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
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)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_wallet_v1_wallet_proto_rawDesc), len(file_proto_wallet_v1_wallet_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 305,
|
NumMessages: 306,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 2,
|
NumServices: 2,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3191,6 +3191,12 @@ message RevokeUserResourceResponse {
|
|||||||
UserResourceEntitlement resource = 1;
|
UserResourceEntitlement resource = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GetResourceGrantRequest {
|
||||||
|
string request_id = 1;
|
||||||
|
string app_code = 2;
|
||||||
|
string grant_id = 3;
|
||||||
|
}
|
||||||
|
|
||||||
// WalletCronService 只给 cron-service 调用;账务状态仍由 wallet-service owner 修改。
|
// WalletCronService 只给 cron-service 调用;账务状态仍由 wallet-service owner 修改。
|
||||||
service WalletCronService {
|
service WalletCronService {
|
||||||
rpc ProcessHostSalaryDailySettlementBatch(CronBatchRequest) returns (CronBatchResponse);
|
rpc ProcessHostSalaryDailySettlementBatch(CronBatchRequest) returns (CronBatchResponse);
|
||||||
@ -3253,6 +3259,8 @@ service WalletService {
|
|||||||
rpc GrantResource(GrantResourceRequest) returns (ResourceGrantResponse);
|
rpc GrantResource(GrantResourceRequest) returns (ResourceGrantResponse);
|
||||||
rpc GrantResourceGroup(GrantResourceGroupRequest) returns (ResourceGrantResponse);
|
rpc GrantResourceGroup(GrantResourceGroupRequest) returns (ResourceGrantResponse);
|
||||||
rpc GrantPinnedResourceGroup(GrantPinnedResourceGroupRequest) returns (ResourceGrantResponse);
|
rpc GrantPinnedResourceGroup(GrantPinnedResourceGroupRequest) returns (ResourceGrantResponse);
|
||||||
|
// GetResourceGrant 按租户和精确 grant_id 读取发放快照,供异步活动消息复用真实发奖结果。
|
||||||
|
rpc GetResourceGrant(GetResourceGrantRequest) returns (ResourceGrantResponse);
|
||||||
rpc RevokeResourceGrant(RevokeResourceGrantRequest) returns (ResourceGrantResponse);
|
rpc RevokeResourceGrant(RevokeResourceGrantRequest) returns (ResourceGrantResponse);
|
||||||
rpc RevokeUserResource(RevokeUserResourceRequest) returns (RevokeUserResourceResponse);
|
rpc RevokeUserResource(RevokeUserResourceRequest) returns (RevokeUserResourceResponse);
|
||||||
rpc ListUserResources(ListUserResourcesRequest) returns (ListUserResourcesResponse);
|
rpc ListUserResources(ListUserResourcesRequest) returns (ListUserResourcesResponse);
|
||||||
|
|||||||
@ -290,6 +290,7 @@ const (
|
|||||||
WalletService_GrantResource_FullMethodName = "/hyapp.wallet.v1.WalletService/GrantResource"
|
WalletService_GrantResource_FullMethodName = "/hyapp.wallet.v1.WalletService/GrantResource"
|
||||||
WalletService_GrantResourceGroup_FullMethodName = "/hyapp.wallet.v1.WalletService/GrantResourceGroup"
|
WalletService_GrantResourceGroup_FullMethodName = "/hyapp.wallet.v1.WalletService/GrantResourceGroup"
|
||||||
WalletService_GrantPinnedResourceGroup_FullMethodName = "/hyapp.wallet.v1.WalletService/GrantPinnedResourceGroup"
|
WalletService_GrantPinnedResourceGroup_FullMethodName = "/hyapp.wallet.v1.WalletService/GrantPinnedResourceGroup"
|
||||||
|
WalletService_GetResourceGrant_FullMethodName = "/hyapp.wallet.v1.WalletService/GetResourceGrant"
|
||||||
WalletService_RevokeResourceGrant_FullMethodName = "/hyapp.wallet.v1.WalletService/RevokeResourceGrant"
|
WalletService_RevokeResourceGrant_FullMethodName = "/hyapp.wallet.v1.WalletService/RevokeResourceGrant"
|
||||||
WalletService_RevokeUserResource_FullMethodName = "/hyapp.wallet.v1.WalletService/RevokeUserResource"
|
WalletService_RevokeUserResource_FullMethodName = "/hyapp.wallet.v1.WalletService/RevokeUserResource"
|
||||||
WalletService_ListUserResources_FullMethodName = "/hyapp.wallet.v1.WalletService/ListUserResources"
|
WalletService_ListUserResources_FullMethodName = "/hyapp.wallet.v1.WalletService/ListUserResources"
|
||||||
@ -428,6 +429,8 @@ type WalletServiceClient interface {
|
|||||||
GrantResource(ctx context.Context, in *GrantResourceRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
GrantResource(ctx context.Context, in *GrantResourceRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
||||||
GrantResourceGroup(ctx context.Context, in *GrantResourceGroupRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
GrantResourceGroup(ctx context.Context, in *GrantResourceGroupRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
||||||
GrantPinnedResourceGroup(ctx context.Context, in *GrantPinnedResourceGroupRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
GrantPinnedResourceGroup(ctx context.Context, in *GrantPinnedResourceGroupRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
||||||
|
// GetResourceGrant 按租户和精确 grant_id 读取发放快照,供异步活动消息复用真实发奖结果。
|
||||||
|
GetResourceGrant(ctx context.Context, in *GetResourceGrantRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
||||||
RevokeResourceGrant(ctx context.Context, in *RevokeResourceGrantRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
RevokeResourceGrant(ctx context.Context, in *RevokeResourceGrantRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error)
|
||||||
RevokeUserResource(ctx context.Context, in *RevokeUserResourceRequest, opts ...grpc.CallOption) (*RevokeUserResourceResponse, error)
|
RevokeUserResource(ctx context.Context, in *RevokeUserResourceRequest, opts ...grpc.CallOption) (*RevokeUserResourceResponse, error)
|
||||||
ListUserResources(ctx context.Context, in *ListUserResourcesRequest, opts ...grpc.CallOption) (*ListUserResourcesResponse, error)
|
ListUserResources(ctx context.Context, in *ListUserResourcesRequest, opts ...grpc.CallOption) (*ListUserResourcesResponse, error)
|
||||||
@ -1027,6 +1030,16 @@ func (c *walletServiceClient) GrantPinnedResourceGroup(ctx context.Context, in *
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *walletServiceClient) GetResourceGrant(ctx context.Context, in *GetResourceGrantRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ResourceGrantResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WalletService_GetResourceGrant_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *walletServiceClient) RevokeResourceGrant(ctx context.Context, in *RevokeResourceGrantRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error) {
|
func (c *walletServiceClient) RevokeResourceGrant(ctx context.Context, in *RevokeResourceGrantRequest, opts ...grpc.CallOption) (*ResourceGrantResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(ResourceGrantResponse)
|
out := new(ResourceGrantResponse)
|
||||||
@ -1865,6 +1878,8 @@ type WalletServiceServer interface {
|
|||||||
GrantResource(context.Context, *GrantResourceRequest) (*ResourceGrantResponse, error)
|
GrantResource(context.Context, *GrantResourceRequest) (*ResourceGrantResponse, error)
|
||||||
GrantResourceGroup(context.Context, *GrantResourceGroupRequest) (*ResourceGrantResponse, error)
|
GrantResourceGroup(context.Context, *GrantResourceGroupRequest) (*ResourceGrantResponse, error)
|
||||||
GrantPinnedResourceGroup(context.Context, *GrantPinnedResourceGroupRequest) (*ResourceGrantResponse, error)
|
GrantPinnedResourceGroup(context.Context, *GrantPinnedResourceGroupRequest) (*ResourceGrantResponse, error)
|
||||||
|
// GetResourceGrant 按租户和精确 grant_id 读取发放快照,供异步活动消息复用真实发奖结果。
|
||||||
|
GetResourceGrant(context.Context, *GetResourceGrantRequest) (*ResourceGrantResponse, error)
|
||||||
RevokeResourceGrant(context.Context, *RevokeResourceGrantRequest) (*ResourceGrantResponse, error)
|
RevokeResourceGrant(context.Context, *RevokeResourceGrantRequest) (*ResourceGrantResponse, error)
|
||||||
RevokeUserResource(context.Context, *RevokeUserResourceRequest) (*RevokeUserResourceResponse, error)
|
RevokeUserResource(context.Context, *RevokeUserResourceRequest) (*RevokeUserResourceResponse, error)
|
||||||
ListUserResources(context.Context, *ListUserResourcesRequest) (*ListUserResourcesResponse, error)
|
ListUserResources(context.Context, *ListUserResourcesRequest) (*ListUserResourcesResponse, error)
|
||||||
@ -2107,6 +2122,9 @@ func (UnimplementedWalletServiceServer) GrantResourceGroup(context.Context, *Gra
|
|||||||
func (UnimplementedWalletServiceServer) GrantPinnedResourceGroup(context.Context, *GrantPinnedResourceGroupRequest) (*ResourceGrantResponse, error) {
|
func (UnimplementedWalletServiceServer) GrantPinnedResourceGroup(context.Context, *GrantPinnedResourceGroupRequest) (*ResourceGrantResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method GrantPinnedResourceGroup not implemented")
|
return nil, status.Error(codes.Unimplemented, "method GrantPinnedResourceGroup not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedWalletServiceServer) GetResourceGrant(context.Context, *GetResourceGrantRequest) (*ResourceGrantResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetResourceGrant not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedWalletServiceServer) RevokeResourceGrant(context.Context, *RevokeResourceGrantRequest) (*ResourceGrantResponse, error) {
|
func (UnimplementedWalletServiceServer) RevokeResourceGrant(context.Context, *RevokeResourceGrantRequest) (*ResourceGrantResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method RevokeResourceGrant not implemented")
|
return nil, status.Error(codes.Unimplemented, "method RevokeResourceGrant not implemented")
|
||||||
}
|
}
|
||||||
@ -3280,6 +3298,24 @@ func _WalletService_GrantPinnedResourceGroup_Handler(srv interface{}, ctx contex
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _WalletService_GetResourceGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetResourceGrantRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WalletServiceServer).GetResourceGrant(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WalletService_GetResourceGrant_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WalletServiceServer).GetResourceGrant(ctx, req.(*GetResourceGrantRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _WalletService_RevokeResourceGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _WalletService_RevokeResourceGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(RevokeResourceGrantRequest)
|
in := new(RevokeResourceGrantRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -4895,6 +4931,10 @@ var WalletService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GrantPinnedResourceGroup",
|
MethodName: "GrantPinnedResourceGroup",
|
||||||
Handler: _WalletService_GrantPinnedResourceGroup_Handler,
|
Handler: _WalletService_GrantPinnedResourceGroup_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetResourceGrant",
|
||||||
|
Handler: _WalletService_GetResourceGrant_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "RevokeResourceGrant",
|
MethodName: "RevokeResourceGrant",
|
||||||
Handler: _WalletService_RevokeResourceGrant_Handler,
|
Handler: _WalletService_RevokeResourceGrant_Handler,
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import (
|
|||||||
inviteactivityservice "hyapp/services/activity-service/internal/service/inviteactivity"
|
inviteactivityservice "hyapp/services/activity-service/internal/service/inviteactivity"
|
||||||
messageservice "hyapp/services/activity-service/internal/service/message"
|
messageservice "hyapp/services/activity-service/internal/service/message"
|
||||||
registrationrewardservice "hyapp/services/activity-service/internal/service/registrationreward"
|
registrationrewardservice "hyapp/services/activity-service/internal/service/registrationreward"
|
||||||
|
rewardnoticeservice "hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
roomturnoverrewardservice "hyapp/services/activity-service/internal/service/roomturnoverreward"
|
roomturnoverrewardservice "hyapp/services/activity-service/internal/service/roomturnoverreward"
|
||||||
sevendaycheckinservice "hyapp/services/activity-service/internal/service/sevendaycheckin"
|
sevendaycheckinservice "hyapp/services/activity-service/internal/service/sevendaycheckin"
|
||||||
taskservice "hyapp/services/activity-service/internal/service/task"
|
taskservice "hyapp/services/activity-service/internal/service/task"
|
||||||
@ -60,14 +61,19 @@ func buildServiceBundle(cfg config.Config, repository *mysqlstorage.Repository,
|
|||||||
activitySvc := activityservice.New(activityservice.Config{NodeID: cfg.NodeID}, repository)
|
activitySvc := activityservice.New(activityservice.Config{NodeID: cfg.NodeID}, repository)
|
||||||
activityTemplateSvc := activitytemplateservice.New(repository, walletClient, regionSource)
|
activityTemplateSvc := activitytemplateservice.New(repository, walletClient, regionSource)
|
||||||
messageSvc := messageservice.New(messageservice.Config{NodeID: cfg.NodeID}, repository, messageservice.WithTargetSource(activityclient.NewGRPCUserTargetSource(clients.userConn)))
|
messageSvc := messageservice.New(messageservice.Config{NodeID: cfg.NodeID}, repository, messageservice.WithTargetSource(activityclient.NewGRPCUserTargetSource(clients.userConn)))
|
||||||
|
// 所有活动奖励消息统一从真实 wallet grant/coin 回执生成;message service 仍是唯一 inbox owner。
|
||||||
|
rewardNoticeSvc := rewardnoticeservice.New(messageSvc, walletClient)
|
||||||
activityTemplateSvc.BindNotice(messageSvc)
|
activityTemplateSvc.BindNotice(messageSvc)
|
||||||
actionConfirmSvc := messageservice.NewActionConfirm(messageservice.Config{
|
actionConfirmSvc := messageservice.NewActionConfirm(messageservice.Config{
|
||||||
NodeID: cfg.NodeID,
|
NodeID: cfg.NodeID,
|
||||||
AppCodes: cfg.MessageActionConfirmWorker.AppCodes,
|
AppCodes: cfg.MessageActionConfirmWorker.AppCodes,
|
||||||
}, repository, activityclient.NewGRPCRoleInvitationClient(clients.userConn))
|
}, repository, activityclient.NewGRPCRoleInvitationClient(clients.userConn))
|
||||||
taskSvc := taskservice.New(repository, walletClient)
|
taskSvc := taskservice.New(repository, walletClient)
|
||||||
|
taskSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
registrationRewardSvc := registrationrewardservice.New(repository, walletClient)
|
registrationRewardSvc := registrationrewardservice.New(repository, walletClient)
|
||||||
|
registrationRewardSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
sevenDayCheckInSvc := sevendaycheckinservice.New(repository, walletClient)
|
sevenDayCheckInSvc := sevendaycheckinservice.New(repository, walletClient)
|
||||||
|
sevenDayCheckInSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
growthOptions := []growthservice.Option{growthservice.WithNoticeService(messageSvc)}
|
growthOptions := []growthservice.Option{growthservice.WithNoticeService(messageSvc)}
|
||||||
if userLeaderboardStore != nil {
|
if userLeaderboardStore != nil {
|
||||||
// 复用游戏等级已接收的 game_spend_coin 事实写榜,避免再建一条会漂移口径的游戏消费链路。
|
// 复用游戏等级已接收的 game_spend_coin 事实写榜,避免再建一条会漂移口径的游戏消费链路。
|
||||||
@ -77,8 +83,10 @@ func buildServiceBundle(cfg config.Config, repository *mysqlstorage.Repository,
|
|||||||
achievementSvc := achievementservice.New(repository, walletClient)
|
achievementSvc := achievementservice.New(repository, walletClient)
|
||||||
agencyOpeningSvc := agencyopeningservice.New(repository, walletClient, activityclient.NewGRPCAgencyOpeningSource(clients.userConn), roomClient)
|
agencyOpeningSvc := agencyopeningservice.New(repository, walletClient, activityclient.NewGRPCAgencyOpeningSource(clients.userConn), roomClient)
|
||||||
weeklyStarSvc := weeklystarservice.New(repository, walletClient)
|
weeklyStarSvc := weeklystarservice.New(repository, walletClient)
|
||||||
|
weeklyStarSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
cpWeeklyRankSvc := cpweeklyrankservice.New(repository, activityclient.NewGRPCCPWeeklyRankSource(clients.userConn), walletClient)
|
cpWeeklyRankSvc := cpweeklyrankservice.New(repository, activityclient.NewGRPCCPWeeklyRankSource(clients.userConn), walletClient)
|
||||||
roomTurnoverRewardSvc := roomturnoverrewardservice.New(repository, walletClient, roomClient, roomturnoverrewardservice.WithNoticeService(messageSvc))
|
cpWeeklyRankSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
|
roomTurnoverRewardSvc := roomturnoverrewardservice.New(repository, walletClient, roomClient, roomturnoverrewardservice.WithRewardNotice(rewardNoticeSvc))
|
||||||
|
|
||||||
// Tencent IM 是区域广播、房间礼物播报和红包播报的外部发布器。
|
// Tencent IM 是区域广播、房间礼物播报和红包播报的外部发布器。
|
||||||
// 如果配置要求启动广播 worker,就必须先确认 publisher 可用,避免 worker 启动后只写 outbox 不发消息。
|
// 如果配置要求启动广播 worker,就必须先确认 publisher 可用,避免 worker 启动后只写 outbox 不发消息。
|
||||||
@ -111,9 +119,12 @@ func buildServiceBundle(cfg config.Config, repository *mysqlstorage.Repository,
|
|||||||
userProfileSource := activityclient.NewGRPCUserProfileSource(clients.userConn)
|
userProfileSource := activityclient.NewGRPCUserProfileSource(clients.userConn)
|
||||||
broadcastSvc.SetSenderProfileSource(userProfileSource)
|
broadcastSvc.SetSenderProfileSource(userProfileSource)
|
||||||
broadcastSvc.SetRoomSnapshotSource(activityclient.NewGRPCRoomBroadcastSource(clients.roomConn))
|
broadcastSvc.SetRoomSnapshotSource(activityclient.NewGRPCRoomBroadcastSource(clients.roomConn))
|
||||||
|
broadcastSvc.SetRewardNoticeNotifier(rewardNoticeSvc)
|
||||||
wheelSvc := wheelservice.New(repository, wheelservice.WithWallet(walletClient))
|
wheelSvc := wheelservice.New(repository, wheelservice.WithWallet(walletClient))
|
||||||
firstRechargeRewardSvc := firstrechargeservice.New(repository, walletClient)
|
firstRechargeRewardSvc := firstrechargeservice.New(repository, walletClient)
|
||||||
|
firstRechargeRewardSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
cumulativeRechargeSvc := cumulativerechargeservice.New(repository, walletClient)
|
cumulativeRechargeSvc := cumulativerechargeservice.New(repository, walletClient)
|
||||||
|
cumulativeRechargeSvc.BindRewardNotice(rewardNoticeSvc)
|
||||||
inviteActivityRewardSvc := inviteactivityservice.New(repository, walletClient, activityclient.NewGRPCInviteAttributionSource(clients.userConn))
|
inviteActivityRewardSvc := inviteactivityservice.New(repository, walletClient, activityclient.NewGRPCInviteAttributionSource(clients.userConn))
|
||||||
|
|
||||||
return &serviceBundle{
|
return &serviceBundle{
|
||||||
|
|||||||
@ -39,6 +39,15 @@ type TabSection struct {
|
|||||||
Source string
|
Source string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RewardItem 是活动奖励的客户端展示快照,发奖后不再依赖可变的资源目录。
|
||||||
|
type RewardItem struct {
|
||||||
|
RewardType string `json:"reward_type"`
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
ImageURL string `json:"image_url,omitempty"`
|
||||||
|
Quantity int64 `json:"quantity,omitempty"`
|
||||||
|
DurationDays int64 `json:"duration_days,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// InboxMessage is the user-visible snapshot stored in user_inbox_messages.
|
// InboxMessage is the user-visible snapshot stored in user_inbox_messages.
|
||||||
type InboxMessage struct {
|
type InboxMessage struct {
|
||||||
AppCode string
|
AppCode string
|
||||||
@ -58,7 +67,9 @@ type InboxMessage struct {
|
|||||||
IconURL string
|
IconURL string
|
||||||
ImageURL string
|
ImageURL string
|
||||||
// ImageURLs 是一张通知卡片内的有序图片列表;ImageURL 保留首图兼容旧客户端。
|
// ImageURLs 是一张通知卡片内的有序图片列表;ImageURL 保留首图兼容旧客户端。
|
||||||
ImageURLs []string
|
ImageURLs []string
|
||||||
|
// RewardItems 从 metadata_json 还原为强类型响应;历史消息没有该字段时保持空列表。
|
||||||
|
RewardItems []RewardItem
|
||||||
ActionType string
|
ActionType string
|
||||||
ActionParam string
|
ActionParam string
|
||||||
Priority int32
|
Priority int32
|
||||||
@ -124,7 +135,9 @@ type CreateInput struct {
|
|||||||
IconURL string
|
IconURL string
|
||||||
ImageURL string
|
ImageURL string
|
||||||
// ImageURLs 会由 service 写入受控 metadata 快照,MySQL 继续使用现有 JSON 列持久化。
|
// ImageURLs 会由 service 写入受控 metadata 快照,MySQL 继续使用现有 JSON 列持久化。
|
||||||
ImageURLs []string
|
ImageURLs []string
|
||||||
|
// RewardItems 与发奖事实一起固化,防止资源改名、换图或改时长后历史消息漂移。
|
||||||
|
RewardItems []RewardItem
|
||||||
ActionType string
|
ActionType string
|
||||||
ActionParam string
|
ActionParam string
|
||||||
Priority int32
|
Priority int32
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import (
|
|||||||
"hyapp/pkg/tencentim"
|
"hyapp/pkg/tencentim"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
broadcastdomain "hyapp/services/activity-service/internal/domain/broadcast"
|
broadcastdomain "hyapp/services/activity-service/internal/domain/broadcast"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -139,11 +140,17 @@ type Service struct {
|
|||||||
gameWinConfigRepo GameWinConfigRepository
|
gameWinConfigRepo GameWinConfigRepository
|
||||||
gameWinConfigMu sync.RWMutex
|
gameWinConfigMu sync.RWMutex
|
||||||
gameWinConfigCache map[string]cachedGameWinConfig
|
gameWinConfigCache map[string]cachedGameWinConfig
|
||||||
|
rewardNotices rewardNoticeNotifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
// outboxClaimCursor 轮转跨 App claim 起点,避免默认 lalu 的持续积压饿死其他租户播报。
|
// outboxClaimCursor 轮转跨 App claim 起点,避免默认 lalu 的持续积压饿死其他租户播报。
|
||||||
outboxClaimCursor atomic.Uint64
|
outboxClaimCursor atomic.Uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rewardNoticeNotifier keeps room broadcast independent from the concrete inbox implementation.
|
||||||
|
type rewardNoticeNotifier interface {
|
||||||
|
NotifyReward(ctx context.Context, command rewardnotice.Command) error
|
||||||
|
}
|
||||||
|
|
||||||
// New 创建播报服务。
|
// New 创建播报服务。
|
||||||
// publisher 可以为 nil,此时仍允许消费事件并写 outbox,但真正投递会 fail-closed;本地环境默认不误发腾讯云消息。
|
// publisher 可以为 nil,此时仍允许消费事件并写 outbox,但真正投递会 fail-closed;本地环境默认不误发腾讯云消息。
|
||||||
func New(cfg Config, repository Repository, publisher Publisher, regionSource RegionSource) *Service {
|
func New(cfg Config, repository Repository, publisher Publisher, regionSource RegionSource) *Service {
|
||||||
@ -184,6 +191,13 @@ func (s *Service) SetRoomSnapshotSource(source RoomSnapshotSource) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetRewardNoticeNotifier lets RoomRocketRewardGranted create one private activity message per winner.
|
||||||
|
func (s *Service) SetRewardNoticeNotifier(notices rewardNoticeNotifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.rewardNotices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// EnsureBroadcastGroups 幂等创建全局播报群和所有 active 区域播报群。
|
// EnsureBroadcastGroups 幂等创建全局播报群和所有 active 区域播报群。
|
||||||
// 这个动作放在启动/定时 reconciler,不放在 /im/usersig 路径,避免用户登录被外部腾讯 REST 拖慢。
|
// 这个动作放在启动/定时 reconciler,不放在 /im/usersig 路径,避免用户登录被外部腾讯 REST 拖慢。
|
||||||
// 单个群创建失败不中断其余群的补偿:全局群配额问题不应让所有区域群一起缺失,错误聚合后返回。
|
// 单个群创建失败不中断其余群的补偿:全局群配额问题不应让所有区域群一起缺失,错误聚合后返回。
|
||||||
@ -712,6 +726,34 @@ func (s *Service) handleRoomRocketRewardGranted(ctx context.Context, envelope *r
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return broadcastdomain.ConsumeRoomEventResult{}, err
|
return broadcastdomain.ConsumeRoomEventResult{}, err
|
||||||
}
|
}
|
||||||
|
if s.rewardNotices != nil {
|
||||||
|
grantIDsByUser := make(map[int64][]string)
|
||||||
|
for _, reward := range event.GetRewards() {
|
||||||
|
if reward.GetUserId() <= 0 || reward.GetStatus() != "succeeded" || strings.TrimSpace(reward.GetGrantId()) == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
grantIDsByUser[reward.GetUserId()] = append(grantIDsByUser[reward.GetUserId()], reward.GetGrantId())
|
||||||
|
}
|
||||||
|
for userID, grantIDs := range grantIDsByUser {
|
||||||
|
// 同一用户可能同时是 top1 和点火人;合并全部 grant 后只发一条横向奖励列表消息。
|
||||||
|
if noticeErr := s.rewardNotices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.RoomRocket,
|
||||||
|
TargetUserID: userID,
|
||||||
|
ProducerEventID: envelope.GetEventId() + ":" + fmt.Sprintf("%d", userID),
|
||||||
|
AggregateType: "room_rocket",
|
||||||
|
AggregateID: event.GetRocketId(),
|
||||||
|
GrantIDs: grantIDs,
|
||||||
|
SentAtMS: envelope.GetOccurredAtMs(),
|
||||||
|
Metadata: map[string]any{
|
||||||
|
"rocket_id": event.GetRocketId(),
|
||||||
|
"level": event.GetLevel(),
|
||||||
|
"room_id": envelope.GetRoomId(),
|
||||||
|
},
|
||||||
|
}); noticeErr != nil {
|
||||||
|
return broadcastdomain.ConsumeRoomEventResult{}, noticeErr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return broadcastdomain.ConsumeRoomEventResult{
|
return broadcastdomain.ConsumeRoomEventResult{
|
||||||
EventID: envelope.GetEventId(),
|
EventID: envelope.GetEventId(),
|
||||||
Status: published.Status,
|
Status: published.Status,
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import (
|
|||||||
"hyapp/pkg/logx"
|
"hyapp/pkg/logx"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/cpweeklyrank"
|
domain "hyapp/services/activity-service/internal/domain/cpweeklyrank"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const cpWeeklyRankRewardReason = "cp weekly rank reward"
|
const cpWeeklyRankRewardReason = "cp weekly rank reward"
|
||||||
@ -44,9 +45,16 @@ type Service struct {
|
|||||||
repository Repository
|
repository Repository
|
||||||
rankSource RankSource
|
rankSource RankSource
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func New(repository Repository, rankSource RankSource, wallet WalletClient) *Service {
|
func New(repository Repository, rankSource RankSource, wallet WalletClient) *Service {
|
||||||
return &Service{repository: repository, rankSource: rankSource, wallet: wallet, now: time.Now}
|
return &Service{repository: repository, rankSource: rankSource, wallet: wallet, now: time.Now}
|
||||||
}
|
}
|
||||||
@ -203,6 +211,22 @@ func (s *Service) ProcessSettlementBatch(ctx context.Context, runID string, work
|
|||||||
if resp.GetGrant() != nil {
|
if resp.GetGrant() != nil {
|
||||||
walletGrantID = resp.GetGrant().GetGrantId()
|
walletGrantID = resp.GetGrant().GetGrantId()
|
||||||
}
|
}
|
||||||
|
if s.notices != nil {
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.CPRanking,
|
||||||
|
TargetUserID: settlement.UserID,
|
||||||
|
ProducerEventID: settlement.SettlementID,
|
||||||
|
AggregateType: "cp_weekly_rank_settlement",
|
||||||
|
AggregateID: settlement.SettlementID,
|
||||||
|
Grants: []*walletv1.ResourceGrant{resp.GetGrant()},
|
||||||
|
SentAtMS: s.now().UTC().UnixMilli(),
|
||||||
|
}); noticeErr != nil {
|
||||||
|
logx.Error(ctx, "cp_weekly_rank_create_reward_notice_failed", noticeErr, slog.String("settlement_id", settlement.SettlementID), slog.String("wallet_grant_id", walletGrantID))
|
||||||
|
failure++
|
||||||
|
_ = s.repository.MarkCPWeeklyRankSettlementFailed(ctx, settlement.SettlementID, xerr.MessageOf(noticeErr), s.now().UTC().UnixMilli())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
if err := s.repository.MarkCPWeeklyRankSettlementGranted(ctx, settlement.SettlementID, walletGrantID, s.now().UTC().UnixMilli()); err != nil {
|
if err := s.repository.MarkCPWeeklyRankSettlementGranted(ctx, settlement.SettlementID, walletGrantID, s.now().UTC().UnixMilli()); err != nil {
|
||||||
logx.Error(ctx, "cp_weekly_rank_mark_granted_failed", err, slog.String("settlement_id", settlement.SettlementID), slog.String("wallet_grant_id", walletGrantID))
|
logx.Error(ctx, "cp_weekly_rank_mark_granted_failed", err, slog.String("settlement_id", settlement.SettlementID), slog.String("wallet_grant_id", walletGrantID))
|
||||||
failure++
|
failure++
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import (
|
|||||||
"hyapp/pkg/appcode"
|
"hyapp/pkg/appcode"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/cumulativerecharge"
|
domain "hyapp/services/activity-service/internal/domain/cumulativerecharge"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -40,9 +41,17 @@ type WalletClient interface {
|
|||||||
type Service struct {
|
type Service struct {
|
||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BindRewardNotice connects the shared activity-message module in production wiring.
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func New(repository Repository, wallet WalletClient) *Service {
|
func New(repository Repository, wallet WalletClient) *Service {
|
||||||
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
||||||
}
|
}
|
||||||
@ -164,6 +173,20 @@ func (s *Service) Consume(ctx context.Context, event domain.RechargeEvent) ([]do
|
|||||||
if resp.GetGrant() != nil {
|
if resp.GetGrant() != nil {
|
||||||
walletGrantID = resp.GetGrant().GetGrantId()
|
walletGrantID = resp.GetGrant().GetGrantId()
|
||||||
}
|
}
|
||||||
|
if s.notices != nil {
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.CumulativeRecharge,
|
||||||
|
TargetUserID: grant.UserID,
|
||||||
|
ProducerEventID: grant.GrantID,
|
||||||
|
AggregateType: "cumulative_recharge_grant",
|
||||||
|
AggregateID: grant.GrantID,
|
||||||
|
Grants: []*walletv1.ResourceGrant{resp.GetGrant()},
|
||||||
|
SentAtMS: event.OccurredAtMS,
|
||||||
|
}); noticeErr != nil {
|
||||||
|
_ = s.repository.MarkCumulativeRechargeRewardGrantFailed(ctx, grant.GrantID, xerr.MessageOf(noticeErr), s.now().UTC().UnixMilli())
|
||||||
|
return granted, false, prepared.Reason, noticeErr
|
||||||
|
}
|
||||||
|
}
|
||||||
// 只有拿到 wallet 回执后才落 granted,后台记录因此可以区分“已命中但未到账”和“已到账”。
|
// 只有拿到 wallet 回执后才落 granted,后台记录因此可以区分“已命中但未到账”和“已到账”。
|
||||||
updated, err := s.repository.MarkCumulativeRechargeRewardGrantGranted(ctx, grant.GrantID, walletGrantID, s.now().UTC().UnixMilli())
|
updated, err := s.repository.MarkCumulativeRechargeRewardGrantGranted(ctx, grant.GrantID, walletGrantID, s.now().UTC().UnixMilli())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import (
|
|||||||
"hyapp/pkg/appcode"
|
"hyapp/pkg/appcode"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/firstrecharge"
|
domain "hyapp/services/activity-service/internal/domain/firstrecharge"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -38,9 +39,16 @@ type WalletClient interface {
|
|||||||
type Service struct {
|
type Service struct {
|
||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func New(repository Repository, wallet WalletClient) *Service {
|
func New(repository Repository, wallet WalletClient) *Service {
|
||||||
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
||||||
}
|
}
|
||||||
@ -151,6 +159,20 @@ func (s *Service) Consume(ctx context.Context, event domain.RechargeEvent) (doma
|
|||||||
if resp.GetGrant() != nil {
|
if resp.GetGrant() != nil {
|
||||||
walletGrantID = resp.GetGrant().GetGrantId()
|
walletGrantID = resp.GetGrant().GetGrantId()
|
||||||
}
|
}
|
||||||
|
if s.notices != nil {
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.FirstRecharge,
|
||||||
|
TargetUserID: claim.UserID,
|
||||||
|
ProducerEventID: claim.ClaimID,
|
||||||
|
AggregateType: "first_recharge_claim",
|
||||||
|
AggregateID: claim.ClaimID,
|
||||||
|
Grants: []*walletv1.ResourceGrant{resp.GetGrant()},
|
||||||
|
SentAtMS: event.OccurredAtMS,
|
||||||
|
}); noticeErr != nil {
|
||||||
|
_ = s.repository.MarkFirstRechargeRewardClaimFailed(ctx, claim.ClaimID, xerr.MessageOf(noticeErr), s.now().UnixMilli())
|
||||||
|
return domain.Claim{}, false, "", noticeErr
|
||||||
|
}
|
||||||
|
}
|
||||||
claim, err = s.repository.MarkFirstRechargeRewardClaimGranted(ctx, claim.ClaimID, walletGrantID, s.now().UnixMilli())
|
claim, err = s.repository.MarkFirstRechargeRewardClaimGranted(ctx, claim.ClaimID, walletGrantID, s.now().UnixMilli())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return domain.Claim{}, false, "", err
|
return domain.Claim{}, false, "", err
|
||||||
|
|||||||
@ -27,6 +27,7 @@ type NoticeCommand struct {
|
|||||||
IconURL string
|
IconURL string
|
||||||
ImageURL string
|
ImageURL string
|
||||||
ImageURLs []string
|
ImageURLs []string
|
||||||
|
RewardItems []messagedomain.RewardItem
|
||||||
ActionType string
|
ActionType string
|
||||||
ActionParam string
|
ActionParam string
|
||||||
Priority int32
|
Priority int32
|
||||||
@ -106,6 +107,7 @@ func (s *Service) CreateNotice(ctx context.Context, messageType string, cmd Noti
|
|||||||
IconURL: cmd.IconURL,
|
IconURL: cmd.IconURL,
|
||||||
ImageURL: cmd.ImageURL,
|
ImageURL: cmd.ImageURL,
|
||||||
ImageURLs: cmd.ImageURLs,
|
ImageURLs: cmd.ImageURLs,
|
||||||
|
RewardItems: cmd.RewardItems,
|
||||||
ActionType: cmd.ActionType,
|
ActionType: cmd.ActionType,
|
||||||
ActionParam: cmd.ActionParam,
|
ActionParam: cmd.ActionParam,
|
||||||
Priority: cmd.Priority,
|
Priority: cmd.Priority,
|
||||||
|
|||||||
@ -148,6 +148,7 @@ func (s *Service) ListInboxMessages(ctx context.Context, userID int64, section s
|
|||||||
}
|
}
|
||||||
for index := range messages {
|
for index := range messages {
|
||||||
messages[index].ImageURLs = inboxImageURLs(messages[index].MetadataJSON, messages[index].ImageURL)
|
messages[index].ImageURLs = inboxImageURLs(messages[index].MetadataJSON, messages[index].ImageURL)
|
||||||
|
messages[index].RewardItems = inboxRewardItems(messages[index].MetadataJSON)
|
||||||
}
|
}
|
||||||
if len(messages) <= limit {
|
if len(messages) <= limit {
|
||||||
return messages, "", nil
|
return messages, "", nil
|
||||||
@ -224,6 +225,7 @@ func (s *Service) CreateInboxMessage(ctx context.Context, input messagedomain.Cr
|
|||||||
IconURL: input.IconURL,
|
IconURL: input.IconURL,
|
||||||
ImageURL: input.ImageURL,
|
ImageURL: input.ImageURL,
|
||||||
ImageURLs: append([]string(nil), input.ImageURLs...),
|
ImageURLs: append([]string(nil), input.ImageURLs...),
|
||||||
|
RewardItems: append([]messagedomain.RewardItem(nil), input.RewardItems...),
|
||||||
ActionType: input.ActionType,
|
ActionType: input.ActionType,
|
||||||
ActionParam: input.ActionParam,
|
ActionParam: input.ActionParam,
|
||||||
Priority: input.Priority,
|
Priority: input.Priority,
|
||||||
@ -243,6 +245,7 @@ func (s *Service) CreateInboxMessage(ctx context.Context, input messagedomain.Cr
|
|||||||
return messagedomain.InboxMessage{}, false, xerr.New(xerr.ProducerEventConflict, "producer event payload conflicts with existing inbox message")
|
return messagedomain.InboxMessage{}, false, xerr.New(xerr.ProducerEventConflict, "producer event payload conflicts with existing inbox message")
|
||||||
}
|
}
|
||||||
existing.ImageURLs = inboxImageURLs(existing.MetadataJSON, existing.ImageURL)
|
existing.ImageURLs = inboxImageURLs(existing.MetadataJSON, existing.ImageURL)
|
||||||
|
existing.RewardItems = inboxRewardItems(existing.MetadataJSON)
|
||||||
return existing, false, nil
|
return existing, false, nil
|
||||||
}
|
}
|
||||||
return existing, true, nil
|
return existing, true, nil
|
||||||
@ -363,11 +366,12 @@ func normalizeCreateInput(input messagedomain.CreateInput) messagedomain.CreateI
|
|||||||
input.IconURL = strings.TrimSpace(input.IconURL)
|
input.IconURL = strings.TrimSpace(input.IconURL)
|
||||||
input.ImageURL = strings.TrimSpace(input.ImageURL)
|
input.ImageURL = strings.TrimSpace(input.ImageURL)
|
||||||
input.ImageURLs = normalizeInboxImageURLs(input.ImageURLs, input.ImageURL)
|
input.ImageURLs = normalizeInboxImageURLs(input.ImageURLs, input.ImageURL)
|
||||||
|
input.RewardItems = normalizeInboxRewardItems(input.RewardItems)
|
||||||
if input.ImageURL == "" && len(input.ImageURLs) > 0 {
|
if input.ImageURL == "" && len(input.ImageURLs) > 0 {
|
||||||
input.ImageURL = input.ImageURLs[0]
|
input.ImageURL = input.ImageURLs[0]
|
||||||
}
|
}
|
||||||
// 多图列表写入 inbox owner 的受控 metadata 快照,避免扩表,同时对客户端仍输出强类型字段。
|
// 图片和奖励项都写入 inbox owner 的受控 metadata 快照,避免扩表,同时对客户端仍输出强类型字段。
|
||||||
input.MetadataJSON = inboxMetadataWithImageURLs(input.MetadataJSON, input.ImageURLs)
|
input.MetadataJSON = inboxMetadataWithPresentation(input.MetadataJSON, input.ImageURLs, input.RewardItems)
|
||||||
input.ActionType = strings.TrimSpace(input.ActionType)
|
input.ActionType = strings.TrimSpace(input.ActionType)
|
||||||
input.ActionParam = strings.TrimSpace(input.ActionParam)
|
input.ActionParam = strings.TrimSpace(input.ActionParam)
|
||||||
input.MetadataJSON = strings.TrimSpace(input.MetadataJSON)
|
input.MetadataJSON = strings.TrimSpace(input.MetadataJSON)
|
||||||
@ -413,6 +417,20 @@ func validateCreateInput(input messagedomain.CreateInput) error {
|
|||||||
return xerr.New(xerr.InvalidArgument, "image_urls item is too long")
|
return xerr.New(xerr.InvalidArgument, "image_urls item is too long")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(input.RewardItems) > 100 {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward_items has too many items")
|
||||||
|
}
|
||||||
|
for _, item := range input.RewardItems {
|
||||||
|
if item.RewardType != "resource" && item.RewardType != "coin" {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward_items reward_type is invalid")
|
||||||
|
}
|
||||||
|
if utf8.RuneCountInString(item.Name) > 160 || utf8.RuneCountInString(item.ImageURL) > 512 {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward_items item is too long")
|
||||||
|
}
|
||||||
|
if item.Quantity < 0 || item.DurationDays < 0 {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward_items values cannot be negative")
|
||||||
|
}
|
||||||
|
}
|
||||||
if input.Title == "" || input.Summary == "" {
|
if input.Title == "" || input.Summary == "" {
|
||||||
return xerr.New(xerr.InvalidArgument, "title and summary are required")
|
return xerr.New(xerr.InvalidArgument, "title and summary are required")
|
||||||
}
|
}
|
||||||
@ -428,6 +446,9 @@ func validateCreateInput(input messagedomain.CreateInput) error {
|
|||||||
if len(input.ImageURLs) > 0 && !slices.Equal(inboxImageURLs(input.MetadataJSON, ""), input.ImageURLs) {
|
if len(input.ImageURLs) > 0 && !slices.Equal(inboxImageURLs(input.MetadataJSON, ""), input.ImageURLs) {
|
||||||
return xerr.New(xerr.InvalidArgument, "metadata_json must be an object when image_urls is present")
|
return xerr.New(xerr.InvalidArgument, "metadata_json must be an object when image_urls is present")
|
||||||
}
|
}
|
||||||
|
if len(input.RewardItems) > 0 && !slices.Equal(inboxRewardItems(input.MetadataJSON), input.RewardItems) {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "metadata_json must be an object when reward_items is present")
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,6 +543,8 @@ func firstPositive(values ...int64) int64 {
|
|||||||
func sameInboxPayload(existing messagedomain.InboxMessage, next messagedomain.InboxMessage) bool {
|
func sameInboxPayload(existing messagedomain.InboxMessage, next messagedomain.InboxMessage) bool {
|
||||||
existing.ImageURLs = inboxImageURLs(existing.MetadataJSON, existing.ImageURL)
|
existing.ImageURLs = inboxImageURLs(existing.MetadataJSON, existing.ImageURL)
|
||||||
next.ImageURLs = inboxImageURLs(next.MetadataJSON, next.ImageURL)
|
next.ImageURLs = inboxImageURLs(next.MetadataJSON, next.ImageURL)
|
||||||
|
existing.RewardItems = inboxRewardItems(existing.MetadataJSON)
|
||||||
|
next.RewardItems = inboxRewardItems(next.MetadataJSON)
|
||||||
return existing.UserID == next.UserID &&
|
return existing.UserID == next.UserID &&
|
||||||
existing.MessageType == next.MessageType &&
|
existing.MessageType == next.MessageType &&
|
||||||
existing.Producer == next.Producer &&
|
existing.Producer == next.Producer &&
|
||||||
@ -537,6 +560,7 @@ func sameInboxPayload(existing messagedomain.InboxMessage, next messagedomain.In
|
|||||||
existing.IconURL == next.IconURL &&
|
existing.IconURL == next.IconURL &&
|
||||||
existing.ImageURL == next.ImageURL &&
|
existing.ImageURL == next.ImageURL &&
|
||||||
slices.Equal(existing.ImageURLs, next.ImageURLs) &&
|
slices.Equal(existing.ImageURLs, next.ImageURLs) &&
|
||||||
|
slices.Equal(existing.RewardItems, next.RewardItems) &&
|
||||||
existing.ActionType == next.ActionType &&
|
existing.ActionType == next.ActionType &&
|
||||||
existing.ActionParam == next.ActionParam &&
|
existing.ActionParam == next.ActionParam &&
|
||||||
existing.Priority == next.Priority &&
|
existing.Priority == next.Priority &&
|
||||||
@ -560,7 +584,7 @@ func normalizeInboxImageURLs(values []string, legacyImageURL string) []string {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func inboxMetadataWithImageURLs(raw string, imageURLs []string) string {
|
func inboxMetadataWithPresentation(raw string, imageURLs []string, rewardItems []messagedomain.RewardItem) string {
|
||||||
raw = strings.TrimSpace(raw)
|
raw = strings.TrimSpace(raw)
|
||||||
metadata := map[string]any{}
|
metadata := map[string]any{}
|
||||||
if raw != "" {
|
if raw != "" {
|
||||||
@ -577,6 +601,11 @@ func inboxMetadataWithImageURLs(raw string, imageURLs []string) string {
|
|||||||
} else {
|
} else {
|
||||||
metadata["image_urls"] = imageURLs
|
metadata["image_urls"] = imageURLs
|
||||||
}
|
}
|
||||||
|
if len(rewardItems) == 0 {
|
||||||
|
delete(metadata, "reward_items")
|
||||||
|
} else {
|
||||||
|
metadata["reward_items"] = rewardItems
|
||||||
|
}
|
||||||
if len(metadata) == 0 {
|
if len(metadata) == 0 {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@ -587,6 +616,30 @@ func inboxMetadataWithImageURLs(raw string, imageURLs []string) string {
|
|||||||
return string(body)
|
return string(body)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func normalizeInboxRewardItems(values []messagedomain.RewardItem) []messagedomain.RewardItem {
|
||||||
|
result := make([]messagedomain.RewardItem, 0, len(values))
|
||||||
|
for _, value := range values {
|
||||||
|
value.RewardType = strings.ToLower(strings.TrimSpace(value.RewardType))
|
||||||
|
value.Name = strings.TrimSpace(value.Name)
|
||||||
|
value.ImageURL = strings.TrimSpace(value.ImageURL)
|
||||||
|
if value.RewardType == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
result = append(result, value)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
func inboxRewardItems(raw string) []messagedomain.RewardItem {
|
||||||
|
var metadata struct {
|
||||||
|
RewardItems []messagedomain.RewardItem `json:"reward_items"`
|
||||||
|
}
|
||||||
|
if err := json.Unmarshal([]byte(strings.TrimSpace(raw)), &metadata); err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return normalizeInboxRewardItems(metadata.RewardItems)
|
||||||
|
}
|
||||||
|
|
||||||
func inboxImageURLs(raw string, legacyImageURL string) []string {
|
func inboxImageURLs(raw string, legacyImageURL string) []string {
|
||||||
var metadata struct {
|
var metadata struct {
|
||||||
ImageURLs []string `json:"image_urls"`
|
ImageURLs []string `json:"image_urls"`
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import (
|
|||||||
"hyapp/pkg/appcode"
|
"hyapp/pkg/appcode"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/registrationreward"
|
domain "hyapp/services/activity-service/internal/domain/registrationreward"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -39,9 +40,16 @@ type WalletClient interface {
|
|||||||
type Service struct {
|
type Service struct {
|
||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func New(repository Repository, wallet WalletClient) *Service {
|
func New(repository Repository, wallet WalletClient) *Service {
|
||||||
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
||||||
}
|
}
|
||||||
@ -124,6 +132,7 @@ func (s *Service) IssueRegistrationReward(ctx context.Context, command domain.Is
|
|||||||
claim := prepared.Claim
|
claim := prepared.Claim
|
||||||
var walletTransactionID string
|
var walletTransactionID string
|
||||||
var resourceGrantID string
|
var resourceGrantID string
|
||||||
|
var resourceGrant *walletv1.ResourceGrant
|
||||||
grantedAtMS := s.now().UnixMilli()
|
grantedAtMS := s.now().UnixMilli()
|
||||||
switch claim.RewardType {
|
switch claim.RewardType {
|
||||||
case domain.RewardTypeCoin:
|
case domain.RewardTypeCoin:
|
||||||
@ -160,12 +169,32 @@ func (s *Service) IssueRegistrationReward(ctx context.Context, command domain.Is
|
|||||||
return domain.Claim{}, domain.Eligibility{}, false, err
|
return domain.Claim{}, domain.Eligibility{}, false, err
|
||||||
}
|
}
|
||||||
if resp.GetGrant() != nil {
|
if resp.GetGrant() != nil {
|
||||||
|
resourceGrant = resp.GetGrant()
|
||||||
resourceGrantID = resp.GetGrant().GetGrantId()
|
resourceGrantID = resp.GetGrant().GetGrantId()
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
_ = s.repository.MarkRegistrationRewardClaimFailed(ctx, claim.ClaimID, domain.ReasonInvalidConfig, s.now().UnixMilli())
|
_ = s.repository.MarkRegistrationRewardClaimFailed(ctx, claim.ClaimID, domain.ReasonInvalidConfig, s.now().UnixMilli())
|
||||||
return domain.Claim{}, domain.Eligibility{}, false, xerr.New(xerr.InvalidArgument, "reward_type is invalid")
|
return domain.Claim{}, domain.Eligibility{}, false, xerr.New(xerr.InvalidArgument, "reward_type is invalid")
|
||||||
}
|
}
|
||||||
|
if s.notices != nil {
|
||||||
|
noticeCommand := rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.Registration,
|
||||||
|
TargetUserID: claim.UserID,
|
||||||
|
ProducerEventID: claim.ClaimID,
|
||||||
|
AggregateType: "registration_reward_claim",
|
||||||
|
AggregateID: claim.ClaimID,
|
||||||
|
SentAtMS: grantedAtMS,
|
||||||
|
}
|
||||||
|
if resourceGrant != nil {
|
||||||
|
noticeCommand.Grants = []*walletv1.ResourceGrant{resourceGrant}
|
||||||
|
} else {
|
||||||
|
noticeCommand.CoinAmount = claim.CoinAmount
|
||||||
|
}
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, noticeCommand); noticeErr != nil {
|
||||||
|
_ = s.repository.MarkRegistrationRewardClaimFailed(ctx, claim.ClaimID, xerr.MessageOf(noticeErr), s.now().UnixMilli())
|
||||||
|
return domain.Claim{}, domain.Eligibility{}, false, noticeErr
|
||||||
|
}
|
||||||
|
}
|
||||||
claim, err = s.repository.MarkRegistrationRewardClaimGranted(ctx, claim.ClaimID, walletTransactionID, resourceGrantID, grantedAtMS)
|
claim, err = s.repository.MarkRegistrationRewardClaimGranted(ctx, claim.ClaimID, walletTransactionID, resourceGrantID, grantedAtMS)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return domain.Claim{}, domain.Eligibility{}, false, err
|
return domain.Claim{}, domain.Eligibility{}, false, err
|
||||||
|
|||||||
@ -0,0 +1,314 @@
|
|||||||
|
// Package rewardnotice turns committed wallet reward facts into one idempotent activity inbox message.
|
||||||
|
package rewardnotice
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"math"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
walletv1 "hyapp.local/api/proto/wallet/v1"
|
||||||
|
"hyapp/pkg/appcode"
|
||||||
|
"hyapp/pkg/xerr"
|
||||||
|
messagedomain "hyapp/services/activity-service/internal/domain/message"
|
||||||
|
messageservice "hyapp/services/activity-service/internal/service/message"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
rewardTypeResource = "resource"
|
||||||
|
rewardTypeCoin = "coin"
|
||||||
|
millisecondsPerDay = int64(24 * 60 * 60 * 1000)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Activity 固定活动英文名和稳定代码,避免各发奖链路自行拼出不同文案或幂等键。
|
||||||
|
type Activity struct {
|
||||||
|
Code string
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
CumulativeRecharge = Activity{Code: "cumulative_recharge", Name: "Cumulative Recharge Reward"}
|
||||||
|
WeeklyStar = Activity{Code: "weekly_star", Name: "Weekly Star Reward"}
|
||||||
|
RoomRocket = Activity{Code: "room_rocket", Name: "Room Rocket Reward"}
|
||||||
|
SevenDayCheckIn = Activity{Code: "seven_day_checkin", Name: "Seven-Day Check-In Reward"}
|
||||||
|
FirstRecharge = Activity{Code: "first_recharge", Name: "First Recharge Gift"}
|
||||||
|
Registration = Activity{Code: "registration", Name: "Registration Reward"}
|
||||||
|
DailyTask = Activity{Code: "daily_task", Name: "Daily Task Reward"}
|
||||||
|
CPRanking = Activity{Code: "cp_ranking", Name: "CP Ranking Reward"}
|
||||||
|
RoomTurnover = Activity{Code: "room_turnover", Name: "Room Turnover Reward"}
|
||||||
|
)
|
||||||
|
|
||||||
|
// Command 只接受钱包已成功返回的 grant/coin 事实;调用方不能用活动配置伪造实际到账内容。
|
||||||
|
type Command struct {
|
||||||
|
Activity Activity
|
||||||
|
TargetUserID int64
|
||||||
|
ProducerEventID string
|
||||||
|
AggregateType string
|
||||||
|
AggregateID string
|
||||||
|
Grants []*walletv1.ResourceGrant
|
||||||
|
GrantIDs []string
|
||||||
|
CoinAmount int64
|
||||||
|
SentAtMS int64
|
||||||
|
Metadata map[string]any
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notifier 是九类活动共享的最小依赖面,便于业务服务和 MQ 消费者统一接入。
|
||||||
|
type Notifier interface {
|
||||||
|
NotifyReward(ctx context.Context, command Command) error
|
||||||
|
}
|
||||||
|
|
||||||
|
// ActivityNoticeWriter keeps reward formatting separate from the inbox owner.
|
||||||
|
type ActivityNoticeWriter interface {
|
||||||
|
CreateActivityNotice(ctx context.Context, cmd messageservice.NoticeCommand) (messageservice.NoticeResult, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResourceGrantReader 供异步房间火箭事件按精确 grant_id 补取钱包发放快照。
|
||||||
|
type ResourceGrantReader interface {
|
||||||
|
GetResourceGrant(ctx context.Context, req *walletv1.GetResourceGrantRequest, opts ...grpc.CallOption) (*walletv1.ResourceGrantResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Service owns reward snapshot conversion and activity-message idempotency.
|
||||||
|
type Service struct {
|
||||||
|
notices ActivityNoticeWriter
|
||||||
|
wallet ResourceGrantReader
|
||||||
|
}
|
||||||
|
|
||||||
|
func New(notices ActivityNoticeWriter, wallet ResourceGrantReader) *Service {
|
||||||
|
return &Service{notices: notices, wallet: wallet}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NotifyReward creates exactly one activity message for one business reward event.
|
||||||
|
// 钱包成功、消息失败时调用方保留 pending/failed 状态并重试;稳定 producer_event_id 会让重试只补齐一次消息。
|
||||||
|
func (s *Service) NotifyReward(ctx context.Context, command Command) error {
|
||||||
|
if s == nil || s.notices == nil {
|
||||||
|
return xerr.New(xerr.Unavailable, "reward notice service is not configured")
|
||||||
|
}
|
||||||
|
command = normalizeCommand(command)
|
||||||
|
if err := validateCommand(command); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
grants := append([]*walletv1.ResourceGrant(nil), command.Grants...)
|
||||||
|
for _, grantID := range command.GrantIDs {
|
||||||
|
if s.wallet == nil {
|
||||||
|
return xerr.New(xerr.Unavailable, "wallet resource grant reader is not configured")
|
||||||
|
}
|
||||||
|
// grant_id 来自已提交的 room outbox;精确读取避免分页扫描误拿同用户其它活动奖励。
|
||||||
|
resp, err := s.wallet.GetResourceGrant(ctx, &walletv1.GetResourceGrantRequest{
|
||||||
|
RequestId: "reward-notice:" + command.Activity.Code + ":" + command.ProducerEventID + ":" + grantID,
|
||||||
|
AppCode: appcode.FromContext(ctx),
|
||||||
|
GrantId: grantID,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if resp.GetGrant() == nil {
|
||||||
|
return xerr.New(xerr.Unavailable, "wallet resource grant response is empty")
|
||||||
|
}
|
||||||
|
grants = append(grants, resp.GetGrant())
|
||||||
|
}
|
||||||
|
for _, grant := range grants {
|
||||||
|
if grant == nil || grant.GetTargetUserId() != command.TargetUserID {
|
||||||
|
// 站内信收件人必须与钱包 grant 的真实归属完全一致,不能让事件或调用方传错用户后展示他人奖励。
|
||||||
|
return xerr.New(xerr.Conflict, "reward notice target does not match wallet grant")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rewardItems, grantIDs, err := rewardItemsFromFacts(grants, command.CoinAmount)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
imageURLs := rewardImageURLs(rewardItems)
|
||||||
|
metadata := cloneMetadata(command.Metadata)
|
||||||
|
metadata["activity_code"] = command.Activity.Code
|
||||||
|
metadata["activity_name"] = command.Activity.Name
|
||||||
|
if len(grantIDs) > 0 {
|
||||||
|
metadata["wallet_grant_ids"] = grantIDs
|
||||||
|
}
|
||||||
|
if command.CoinAmount > 0 {
|
||||||
|
metadata["coin_amount"] = command.CoinAmount
|
||||||
|
}
|
||||||
|
body := "You received the " + command.Activity.Name + ":"
|
||||||
|
_, err = s.notices.CreateActivityNotice(ctx, messageservice.NoticeCommand{
|
||||||
|
TargetUserID: command.TargetUserID,
|
||||||
|
Producer: "activity-reward",
|
||||||
|
ProducerEventID: "reward:" + command.Activity.Code + ":" + command.ProducerEventID,
|
||||||
|
ProducerEventType: "activity_reward_granted",
|
||||||
|
AggregateType: command.AggregateType,
|
||||||
|
AggregateID: command.AggregateID,
|
||||||
|
Title: command.Activity.Name,
|
||||||
|
Summary: body,
|
||||||
|
Body: body,
|
||||||
|
ImageURLs: imageURLs,
|
||||||
|
RewardItems: rewardItems,
|
||||||
|
SentAtMS: command.SentAtMS,
|
||||||
|
Metadata: metadata,
|
||||||
|
})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func normalizeCommand(command Command) Command {
|
||||||
|
command.Activity.Code = strings.ToLower(strings.TrimSpace(command.Activity.Code))
|
||||||
|
command.Activity.Name = strings.TrimSpace(command.Activity.Name)
|
||||||
|
command.ProducerEventID = strings.TrimSpace(command.ProducerEventID)
|
||||||
|
command.AggregateType = strings.TrimSpace(command.AggregateType)
|
||||||
|
command.AggregateID = strings.TrimSpace(command.AggregateID)
|
||||||
|
if command.AggregateType == "" {
|
||||||
|
command.AggregateType = "activity_reward"
|
||||||
|
}
|
||||||
|
if command.AggregateID == "" {
|
||||||
|
command.AggregateID = command.ProducerEventID
|
||||||
|
}
|
||||||
|
grantIDs := make([]string, 0, len(command.GrantIDs))
|
||||||
|
seen := make(map[string]struct{}, len(command.GrantIDs))
|
||||||
|
for _, grantID := range command.GrantIDs {
|
||||||
|
grantID = strings.TrimSpace(grantID)
|
||||||
|
if grantID == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if _, exists := seen[grantID]; exists {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
seen[grantID] = struct{}{}
|
||||||
|
grantIDs = append(grantIDs, grantID)
|
||||||
|
}
|
||||||
|
command.GrantIDs = grantIDs
|
||||||
|
return command
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateCommand(command Command) error {
|
||||||
|
if command.Activity.Code == "" || command.Activity.Name == "" || command.TargetUserID <= 0 || command.ProducerEventID == "" {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward notice command is incomplete")
|
||||||
|
}
|
||||||
|
if command.CoinAmount < 0 {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward notice coin amount cannot be negative")
|
||||||
|
}
|
||||||
|
if command.CoinAmount == 0 && len(command.Grants) == 0 && len(command.GrantIDs) == 0 {
|
||||||
|
return xerr.New(xerr.InvalidArgument, "reward notice facts are required")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func rewardItemsFromFacts(grants []*walletv1.ResourceGrant, coinAmount int64) ([]messagedomain.RewardItem, []string, error) {
|
||||||
|
items := make([]messagedomain.RewardItem, 0)
|
||||||
|
grantIDs := make([]string, 0, len(grants))
|
||||||
|
totalCoin := coinAmount
|
||||||
|
for _, grant := range grants {
|
||||||
|
if grant == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if grantID := strings.TrimSpace(grant.GetGrantId()); grantID != "" {
|
||||||
|
grantIDs = append(grantIDs, grantID)
|
||||||
|
}
|
||||||
|
for _, grantItem := range grant.GetItems() {
|
||||||
|
if grantItem == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
snapshot := parseSnapshot(grantItem.GetResourceSnapshotJson())
|
||||||
|
if strings.EqualFold(grantItem.GetResultType(), "wallet_credit") {
|
||||||
|
amount := grantItem.GetQuantity()
|
||||||
|
// 普通 wallet-credit 资源的 quantity 是资源份数,实际金币为快照单份金额乘份数;
|
||||||
|
// 资源组原生 wallet_asset 项的 quantity 已经是最终入账额,不能再次相乘。
|
||||||
|
if grantItem.GetResourceId() > 0 {
|
||||||
|
perItem := snapshotInt64(snapshot, "WalletAssetAmount", "wallet_asset_amount")
|
||||||
|
if perItem > 0 {
|
||||||
|
if grantItem.GetQuantity() > math.MaxInt64/perItem {
|
||||||
|
return nil, nil, xerr.New(xerr.InvalidArgument, "reward coin amount overflows")
|
||||||
|
}
|
||||||
|
amount = perItem * grantItem.GetQuantity()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if amount > math.MaxInt64-totalCoin {
|
||||||
|
return nil, nil, xerr.New(xerr.InvalidArgument, "reward coin amount overflows")
|
||||||
|
}
|
||||||
|
totalCoin += amount
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
items = append(items, messagedomain.RewardItem{
|
||||||
|
RewardType: rewardTypeResource,
|
||||||
|
Name: firstText(snapshotString(snapshot, "Name", "name"), "Reward"),
|
||||||
|
ImageURL: firstText(snapshotString(snapshot, "PreviewURL", "preview_url"), snapshotString(snapshot, "AssetURL", "asset_url"), snapshotString(snapshot, "AnimationURL", "animation_url")),
|
||||||
|
Quantity: grantItem.GetQuantity(),
|
||||||
|
DurationDays: durationDays(grantItem.GetDurationMs()),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if totalCoin > 0 {
|
||||||
|
items = append(items, messagedomain.RewardItem{RewardType: rewardTypeCoin, Name: "Coins", Quantity: totalCoin})
|
||||||
|
}
|
||||||
|
if len(items) == 0 {
|
||||||
|
return nil, nil, xerr.New(xerr.InvalidArgument, "reward notice has no displayable items")
|
||||||
|
}
|
||||||
|
return items, grantIDs, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func rewardImageURLs(items []messagedomain.RewardItem) []string {
|
||||||
|
result := make([]string, 0, len(items))
|
||||||
|
for _, item := range items {
|
||||||
|
if item.RewardType == rewardTypeResource && strings.TrimSpace(item.ImageURL) != "" {
|
||||||
|
result = append(result, item.ImageURL)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
func durationDays(durationMS int64) int64 {
|
||||||
|
if durationMS <= 0 {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
// 非整日历史配置向上取整,避免实际仍有效的奖励在消息里显示 0 天。
|
||||||
|
return (durationMS + millisecondsPerDay - 1) / millisecondsPerDay
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseSnapshot(raw string) map[string]any {
|
||||||
|
var snapshot map[string]any
|
||||||
|
if err := json.Unmarshal([]byte(strings.TrimSpace(raw)), &snapshot); err != nil || snapshot == nil {
|
||||||
|
return map[string]any{}
|
||||||
|
}
|
||||||
|
return snapshot
|
||||||
|
}
|
||||||
|
|
||||||
|
func snapshotString(snapshot map[string]any, keys ...string) string {
|
||||||
|
for _, key := range keys {
|
||||||
|
if value, exists := snapshot[key]; exists {
|
||||||
|
if text := strings.TrimSpace(fmt.Sprint(value)); text != "" && text != "<nil>" {
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func snapshotInt64(snapshot map[string]any, keys ...string) int64 {
|
||||||
|
for _, key := range keys {
|
||||||
|
switch value := snapshot[key].(type) {
|
||||||
|
case float64:
|
||||||
|
return int64(value)
|
||||||
|
case int64:
|
||||||
|
return value
|
||||||
|
case json.Number:
|
||||||
|
parsed, _ := value.Int64()
|
||||||
|
return parsed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func cloneMetadata(source map[string]any) map[string]any {
|
||||||
|
result := make(map[string]any, len(source)+3)
|
||||||
|
for key, value := range source {
|
||||||
|
result[key] = value
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
func firstText(values ...string) string {
|
||||||
|
for _, value := range values {
|
||||||
|
if value = strings.TrimSpace(value); value != "" {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
@ -16,6 +16,7 @@ import (
|
|||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/roomturnoverreward"
|
domain "hyapp/services/activity-service/internal/domain/roomturnoverreward"
|
||||||
messageservice "hyapp/services/activity-service/internal/service/message"
|
messageservice "hyapp/services/activity-service/internal/service/message"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -67,13 +68,21 @@ func WithNoticeService(notices NoticeService) Option {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithRewardNotice connects the shared structured activity-message module used by production.
|
||||||
|
func WithRewardNotice(notices rewardnotice.Notifier) Option {
|
||||||
|
return func(s *Service) {
|
||||||
|
s.rewardNotices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Service 承载房间贡献奖励 App 查询、后台配置、事件聚合和每周结算。
|
// Service 承载房间贡献奖励 App 查询、后台配置、事件聚合和每周结算。
|
||||||
type Service struct {
|
type Service struct {
|
||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
room RoomQueryClient
|
room RoomQueryClient
|
||||||
notices NoticeService
|
notices NoticeService
|
||||||
now func() time.Time
|
rewardNotices rewardnotice.Notifier
|
||||||
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(repository Repository, wallet WalletClient, room RoomQueryClient, options ...Option) *Service {
|
func New(repository Repository, wallet WalletClient, room RoomQueryClient, options ...Option) *Service {
|
||||||
@ -393,7 +402,7 @@ func (s *Service) grantSettlement(ctx context.Context, settlement domain.Settlem
|
|||||||
nowMS := s.now().UTC().UnixMilli()
|
nowMS := s.now().UTC().UnixMilli()
|
||||||
return s.repository.MarkRoomTurnoverRewardSettlementGranted(ctx, settlement.SettlementID, "", nowMS)
|
return s.repository.MarkRoomTurnoverRewardSettlementGranted(ctx, settlement.SettlementID, "", nowMS)
|
||||||
}
|
}
|
||||||
if s.notices == nil {
|
if s.rewardNotices == nil && s.notices == nil {
|
||||||
err := xerr.New(xerr.Unavailable, "room turnover reward notice service is not configured")
|
err := xerr.New(xerr.Unavailable, "room turnover reward notice service is not configured")
|
||||||
_ = s.repository.MarkRoomTurnoverRewardSettlementFailed(ctx, settlement.SettlementID, xerr.MessageOf(err), s.now().UTC().UnixMilli())
|
_ = s.repository.MarkRoomTurnoverRewardSettlementFailed(ctx, settlement.SettlementID, xerr.MessageOf(err), s.now().UTC().UnixMilli())
|
||||||
return domain.Settlement{}, err
|
return domain.Settlement{}, err
|
||||||
@ -431,12 +440,36 @@ func (s *Service) grantSettlement(ctx context.Context, settlement domain.Settlem
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Service) createRewardGrantedNotice(ctx context.Context, settlement domain.Settlement, walletTransactionID string, grantedAtMS int64) error {
|
func (s *Service) createRewardGrantedNotice(ctx context.Context, settlement domain.Settlement, walletTransactionID string, grantedAtMS int64) error {
|
||||||
if s.notices == nil {
|
if s.rewardNotices == nil && s.notices == nil {
|
||||||
return xerr.New(xerr.Unavailable, "room turnover reward notice service is not configured")
|
return xerr.New(xerr.Unavailable, "room turnover reward notice service is not configured")
|
||||||
}
|
}
|
||||||
if grantedAtMS <= 0 {
|
if grantedAtMS <= 0 {
|
||||||
grantedAtMS = s.now().UTC().UnixMilli()
|
grantedAtMS = s.now().UTC().UnixMilli()
|
||||||
}
|
}
|
||||||
|
metadata := map[string]any{
|
||||||
|
"settlement_id": settlement.SettlementID,
|
||||||
|
"room_id": settlement.RoomID,
|
||||||
|
"period_start_ms": settlement.PeriodStartMS,
|
||||||
|
"period_end_ms": settlement.PeriodEndMS,
|
||||||
|
"coin_spent": settlement.CoinSpent,
|
||||||
|
"reward_coin_amount": settlement.RewardCoinAmount,
|
||||||
|
"tier_id": settlement.TierID,
|
||||||
|
"tier_code": settlement.TierCode,
|
||||||
|
"wallet_transaction_id": walletTransactionID,
|
||||||
|
}
|
||||||
|
if s.rewardNotices != nil {
|
||||||
|
return s.rewardNotices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.RoomTurnover,
|
||||||
|
TargetUserID: settlement.OwnerUserID,
|
||||||
|
ProducerEventID: settlement.SettlementID,
|
||||||
|
AggregateType: rewardNoticeAggregateType,
|
||||||
|
AggregateID: settlement.SettlementID,
|
||||||
|
CoinAmount: settlement.RewardCoinAmount,
|
||||||
|
SentAtMS: grantedAtMS,
|
||||||
|
Metadata: metadata,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// Legacy injection remains only for isolated older tests; production always supplies rewardNotices.
|
||||||
summary := roomTurnoverRewardNoticeSummary(settlement.RewardCoinAmount)
|
summary := roomTurnoverRewardNoticeSummary(settlement.RewardCoinAmount)
|
||||||
_, err := s.notices.CreateSystemNotice(ctx, messageservice.NoticeCommand{
|
_, err := s.notices.CreateSystemNotice(ctx, messageservice.NoticeCommand{
|
||||||
TargetUserID: settlement.OwnerUserID,
|
TargetUserID: settlement.OwnerUserID,
|
||||||
@ -449,17 +482,7 @@ func (s *Service) createRewardGrantedNotice(ctx context.Context, settlement doma
|
|||||||
Summary: summary,
|
Summary: summary,
|
||||||
Body: summary,
|
Body: summary,
|
||||||
SentAtMS: grantedAtMS,
|
SentAtMS: grantedAtMS,
|
||||||
Metadata: map[string]any{
|
Metadata: metadata,
|
||||||
"settlement_id": settlement.SettlementID,
|
|
||||||
"room_id": settlement.RoomID,
|
|
||||||
"period_start_ms": settlement.PeriodStartMS,
|
|
||||||
"period_end_ms": settlement.PeriodEndMS,
|
|
||||||
"coin_spent": settlement.CoinSpent,
|
|
||||||
"reward_coin_amount": settlement.RewardCoinAmount,
|
|
||||||
"tier_id": settlement.TierID,
|
|
||||||
"tier_code": settlement.TierCode,
|
|
||||||
"wallet_transaction_id": walletTransactionID,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import (
|
|||||||
"hyapp/pkg/appcode"
|
"hyapp/pkg/appcode"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/sevendaycheckin"
|
domain "hyapp/services/activity-service/internal/domain/sevendaycheckin"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -42,9 +43,16 @@ type WalletClient interface {
|
|||||||
type Service struct {
|
type Service struct {
|
||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func New(repository Repository, wallet WalletClient) *Service {
|
func New(repository Repository, wallet WalletClient) *Service {
|
||||||
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
return &Service{repository: repository, wallet: wallet, now: time.Now}
|
||||||
}
|
}
|
||||||
@ -162,6 +170,20 @@ func (s *Service) Sign(ctx context.Context, userID int64, commandID string) (dom
|
|||||||
if resp.GetGrant() != nil {
|
if resp.GetGrant() != nil {
|
||||||
walletGrantID = resp.GetGrant().GetGrantId()
|
walletGrantID = resp.GetGrant().GetGrantId()
|
||||||
}
|
}
|
||||||
|
if s.notices != nil {
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.SevenDayCheckIn,
|
||||||
|
TargetUserID: claim.UserID,
|
||||||
|
ProducerEventID: claim.ClaimID,
|
||||||
|
AggregateType: "seven_day_checkin_claim",
|
||||||
|
AggregateID: claim.ClaimID,
|
||||||
|
Grants: []*walletv1.ResourceGrant{resp.GetGrant()},
|
||||||
|
SentAtMS: s.now().UnixMilli(),
|
||||||
|
}); noticeErr != nil {
|
||||||
|
_ = s.repository.MarkSevenDayCheckInClaimFailed(ctx, claim.ClaimID, xerr.MessageOf(noticeErr), s.now().UnixMilli())
|
||||||
|
return domain.Claim{}, noticeErr
|
||||||
|
}
|
||||||
|
}
|
||||||
return s.repository.MarkSevenDayCheckInClaimGranted(ctx, claim.ClaimID, walletGrantID, s.now().UnixMilli())
|
return s.repository.MarkSevenDayCheckInClaimGranted(ctx, claim.ClaimID, walletGrantID, s.now().UnixMilli())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import (
|
|||||||
"hyapp/pkg/appcode"
|
"hyapp/pkg/appcode"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
taskdomain "hyapp/services/activity-service/internal/domain/task"
|
taskdomain "hyapp/services/activity-service/internal/domain/task"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Repository 是任务系统的唯一持久化边界;进度、领奖和事件幂等都必须落 activity MySQL。
|
// Repository 是任务系统的唯一持久化边界;进度、领奖和事件幂等都必须落 activity MySQL。
|
||||||
@ -53,9 +54,16 @@ type Service struct {
|
|||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
resourceWallet ResourceWalletClient
|
resourceWallet ResourceWalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// New 创建任务服务;daily 周期固定按 UTC 自然日切分,不读取机器或客户端时区。
|
// New 创建任务服务;daily 周期固定按 UTC 自然日切分,不读取机器或客户端时区。
|
||||||
func New(repository Repository, wallet WalletClient) *Service {
|
func New(repository Repository, wallet WalletClient) *Service {
|
||||||
service := &Service{repository: repository, wallet: wallet, now: time.Now}
|
service := &Service{repository: repository, wallet: wallet, now: time.Now}
|
||||||
@ -166,6 +174,25 @@ func (s *Service) ClaimTaskReward(ctx context.Context, command taskdomain.ClaimC
|
|||||||
if grantedAtMS <= 0 {
|
if grantedAtMS <= 0 {
|
||||||
grantedAtMS = s.now().UnixMilli()
|
grantedAtMS = s.now().UnixMilli()
|
||||||
}
|
}
|
||||||
|
if command.TaskType == taskdomain.TypeDaily && s.notices != nil {
|
||||||
|
noticeCommand := rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.DailyTask,
|
||||||
|
TargetUserID: claim.UserID,
|
||||||
|
ProducerEventID: claim.ClaimID,
|
||||||
|
AggregateType: "daily_task_claim",
|
||||||
|
AggregateID: claim.ClaimID,
|
||||||
|
SentAtMS: grantedAtMS,
|
||||||
|
}
|
||||||
|
if walletResourceGrantID != "" {
|
||||||
|
noticeCommand.GrantIDs = []string{walletResourceGrantID}
|
||||||
|
} else {
|
||||||
|
noticeCommand.CoinAmount = claim.RewardCoinAmount
|
||||||
|
}
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, noticeCommand); noticeErr != nil {
|
||||||
|
_ = s.repository.MarkTaskClaimFailed(ctx, claim.ClaimID, xerr.MessageOf(noticeErr), s.now().UnixMilli())
|
||||||
|
return taskdomain.Claim{}, noticeErr
|
||||||
|
}
|
||||||
|
}
|
||||||
return s.repository.MarkTaskClaimGranted(ctx, claim.ClaimID, walletTransactionID, walletResourceGrantID, grantedAtMS)
|
return s.repository.MarkTaskClaimGranted(ctx, claim.ClaimID, walletTransactionID, walletResourceGrantID, grantedAtMS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import (
|
|||||||
"hyapp/pkg/logx"
|
"hyapp/pkg/logx"
|
||||||
"hyapp/pkg/xerr"
|
"hyapp/pkg/xerr"
|
||||||
domain "hyapp/services/activity-service/internal/domain/weeklystar"
|
domain "hyapp/services/activity-service/internal/domain/weeklystar"
|
||||||
|
"hyapp/services/activity-service/internal/service/rewardnotice"
|
||||||
)
|
)
|
||||||
|
|
||||||
const weeklyStarRewardReason = "weekly star reward"
|
const weeklyStarRewardReason = "weekly star reward"
|
||||||
@ -47,9 +48,16 @@ type WalletClient interface {
|
|||||||
type Service struct {
|
type Service struct {
|
||||||
repository Repository
|
repository Repository
|
||||||
wallet WalletClient
|
wallet WalletClient
|
||||||
|
notices rewardnotice.Notifier
|
||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) BindRewardNotice(notices rewardnotice.Notifier) {
|
||||||
|
if s != nil {
|
||||||
|
s.notices = notices
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// New creates the weekly-star service with activity-service storage as the source of truth.
|
// New creates the weekly-star service with activity-service storage as the source of truth.
|
||||||
func New(repository Repository, wallet WalletClient) *Service {
|
func New(repository Repository, wallet WalletClient) *Service {
|
||||||
return &Service{
|
return &Service{
|
||||||
@ -252,6 +260,22 @@ func (s *Service) ProcessSettlementBatch(ctx context.Context, runID string, work
|
|||||||
if resp.GetGrant() != nil {
|
if resp.GetGrant() != nil {
|
||||||
walletGrantID = resp.GetGrant().GetGrantId()
|
walletGrantID = resp.GetGrant().GetGrantId()
|
||||||
}
|
}
|
||||||
|
if s.notices != nil {
|
||||||
|
if noticeErr := s.notices.NotifyReward(ctx, rewardnotice.Command{
|
||||||
|
Activity: rewardnotice.WeeklyStar,
|
||||||
|
TargetUserID: settlement.UserID,
|
||||||
|
ProducerEventID: settlement.SettlementID,
|
||||||
|
AggregateType: "weekly_star_settlement",
|
||||||
|
AggregateID: settlement.SettlementID,
|
||||||
|
Grants: []*walletv1.ResourceGrant{resp.GetGrant()},
|
||||||
|
SentAtMS: s.now().UnixMilli(),
|
||||||
|
}); noticeErr != nil {
|
||||||
|
logx.Error(ctx, "weekly_star_create_reward_notice_failed", noticeErr, slog.String("settlement_id", settlement.SettlementID), slog.String("wallet_grant_id", walletGrantID))
|
||||||
|
failure++
|
||||||
|
_ = s.repository.MarkWeeklyStarSettlementFailed(ctx, settlement.SettlementID, xerr.MessageOf(noticeErr), s.now().UnixMilli())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
if markErr := s.repository.MarkWeeklyStarSettlementGranted(ctx, settlement.SettlementID, walletGrantID, s.now().UnixMilli()); markErr != nil {
|
if markErr := s.repository.MarkWeeklyStarSettlementGranted(ctx, settlement.SettlementID, walletGrantID, s.now().UnixMilli()); markErr != nil {
|
||||||
logx.Error(ctx, "weekly_star_mark_settlement_granted_failed", markErr, slog.String("cycle_id", cycle.CycleID), slog.String("settlement_id", settlement.SettlementID), slog.String("wallet_grant_id", walletGrantID))
|
logx.Error(ctx, "weekly_star_mark_settlement_granted_failed", markErr, slog.String("cycle_id", cycle.CycleID), slog.String("settlement_id", settlement.SettlementID), slog.String("wallet_grant_id", walletGrantID))
|
||||||
failure++
|
failure++
|
||||||
|
|||||||
@ -98,6 +98,7 @@ func (s *MessageServer) CreateInboxMessage(ctx context.Context, req *activityv1.
|
|||||||
IconURL: req.GetIconUrl(),
|
IconURL: req.GetIconUrl(),
|
||||||
ImageURL: req.GetImageUrl(),
|
ImageURL: req.GetImageUrl(),
|
||||||
ImageURLs: req.GetImageUrls(),
|
ImageURLs: req.GetImageUrls(),
|
||||||
|
RewardItems: inboxRewardItemsFromProto(req.GetRewardItems()),
|
||||||
ActionType: req.GetActionType(),
|
ActionType: req.GetActionType(),
|
||||||
ActionParam: req.GetActionParam(),
|
ActionParam: req.GetActionParam(),
|
||||||
Priority: req.GetPriority(),
|
Priority: req.GetPriority(),
|
||||||
@ -142,9 +143,41 @@ func inboxMessageProto(message messagedomain.InboxMessage) *activityv1.InboxMess
|
|||||||
IconUrl: message.IconURL,
|
IconUrl: message.IconURL,
|
||||||
ImageUrl: message.ImageURL,
|
ImageUrl: message.ImageURL,
|
||||||
ImageUrls: imageURLs,
|
ImageUrls: imageURLs,
|
||||||
|
RewardItems: inboxRewardItemsToProto(message.RewardItems),
|
||||||
ActionType: message.ActionType,
|
ActionType: message.ActionType,
|
||||||
ActionParam: message.ActionParam,
|
ActionParam: message.ActionParam,
|
||||||
Read: message.Read(),
|
Read: message.Read(),
|
||||||
SentAtMs: message.SentAtMS,
|
SentAtMs: message.SentAtMS,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func inboxRewardItemsFromProto(items []*activityv1.InboxRewardItem) []messagedomain.RewardItem {
|
||||||
|
result := make([]messagedomain.RewardItem, 0, len(items))
|
||||||
|
for _, item := range items {
|
||||||
|
if item == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
result = append(result, messagedomain.RewardItem{
|
||||||
|
RewardType: item.GetRewardType(),
|
||||||
|
Name: item.GetName(),
|
||||||
|
ImageURL: item.GetImageUrl(),
|
||||||
|
Quantity: item.GetQuantity(),
|
||||||
|
DurationDays: item.GetDurationDays(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
func inboxRewardItemsToProto(items []messagedomain.RewardItem) []*activityv1.InboxRewardItem {
|
||||||
|
result := make([]*activityv1.InboxRewardItem, 0, len(items))
|
||||||
|
for _, item := range items {
|
||||||
|
result = append(result, &activityv1.InboxRewardItem{
|
||||||
|
RewardType: item.RewardType,
|
||||||
|
Name: item.Name,
|
||||||
|
ImageUrl: item.ImageURL,
|
||||||
|
Quantity: item.Quantity,
|
||||||
|
DurationDays: item.DurationDays,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|||||||
@ -21,17 +21,26 @@ type messageTabSectionData struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type inboxMessageData struct {
|
type inboxMessageData struct {
|
||||||
MessageID string `json:"message_id"`
|
MessageID string `json:"message_id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Summary string `json:"summary"`
|
Summary string `json:"summary"`
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
IconURL string `json:"icon_url"`
|
IconURL string `json:"icon_url"`
|
||||||
ImageURL string `json:"image_url"`
|
ImageURL string `json:"image_url"`
|
||||||
ImageURLs []string `json:"image_urls"`
|
ImageURLs []string `json:"image_urls"`
|
||||||
ActionType string `json:"action_type"`
|
RewardItems []inboxRewardItemData `json:"reward_items"`
|
||||||
ActionParam string `json:"action_param"`
|
ActionType string `json:"action_type"`
|
||||||
Read bool `json:"read"`
|
ActionParam string `json:"action_param"`
|
||||||
SentAtMS int64 `json:"sent_at_ms"`
|
Read bool `json:"read"`
|
||||||
|
SentAtMS int64 `json:"sent_at_ms"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type inboxRewardItemData struct {
|
||||||
|
RewardType string `json:"reward_type"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
ImageURL string `json:"image_url"`
|
||||||
|
Quantity int64 `json:"quantity"`
|
||||||
|
DurationDays int64 `json:"duration_days"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type actionConfirmData struct {
|
type actionConfirmData struct {
|
||||||
@ -111,6 +120,16 @@ func (h *Handler) listInboxMessages(writer http.ResponseWriter, request *http.Re
|
|||||||
}
|
}
|
||||||
items := make([]inboxMessageData, 0, len(resp.GetItems()))
|
items := make([]inboxMessageData, 0, len(resp.GetItems()))
|
||||||
for _, item := range resp.GetItems() {
|
for _, item := range resp.GetItems() {
|
||||||
|
rewardItems := make([]inboxRewardItemData, 0, len(item.GetRewardItems()))
|
||||||
|
for _, reward := range item.GetRewardItems() {
|
||||||
|
rewardItems = append(rewardItems, inboxRewardItemData{
|
||||||
|
RewardType: reward.GetRewardType(),
|
||||||
|
Name: reward.GetName(),
|
||||||
|
ImageURL: reward.GetImageUrl(),
|
||||||
|
Quantity: reward.GetQuantity(),
|
||||||
|
DurationDays: reward.GetDurationDays(),
|
||||||
|
})
|
||||||
|
}
|
||||||
items = append(items, inboxMessageData{
|
items = append(items, inboxMessageData{
|
||||||
MessageID: item.GetMessageId(),
|
MessageID: item.GetMessageId(),
|
||||||
Title: item.GetTitle(),
|
Title: item.GetTitle(),
|
||||||
@ -119,6 +138,7 @@ func (h *Handler) listInboxMessages(writer http.ResponseWriter, request *http.Re
|
|||||||
IconURL: item.GetIconUrl(),
|
IconURL: item.GetIconUrl(),
|
||||||
ImageURL: item.GetImageUrl(),
|
ImageURL: item.GetImageUrl(),
|
||||||
ImageURLs: item.GetImageUrls(),
|
ImageURLs: item.GetImageUrls(),
|
||||||
|
RewardItems: rewardItems,
|
||||||
ActionType: item.GetActionType(),
|
ActionType: item.GetActionType(),
|
||||||
ActionParam: item.GetActionParam(),
|
ActionParam: item.GetActionParam(),
|
||||||
Read: item.GetRead(),
|
Read: item.GetRead(),
|
||||||
|
|||||||
@ -216,6 +216,7 @@ type ResourceCatalogStore interface {
|
|||||||
type ResourceGrantStore interface {
|
type ResourceGrantStore interface {
|
||||||
GrantResource(ctx context.Context, command resourcedomain.GrantResourceCommand) (resourcedomain.ResourceGrant, error)
|
GrantResource(ctx context.Context, command resourcedomain.GrantResourceCommand) (resourcedomain.ResourceGrant, error)
|
||||||
GrantResourceGroup(ctx context.Context, command resourcedomain.GrantResourceGroupCommand) (resourcedomain.ResourceGrant, error)
|
GrantResourceGroup(ctx context.Context, command resourcedomain.GrantResourceGroupCommand) (resourcedomain.ResourceGrant, error)
|
||||||
|
GetResourceGrant(ctx context.Context, grantID string) (resourcedomain.ResourceGrant, error)
|
||||||
RevokeResourceGrant(ctx context.Context, command resourcedomain.RevokeResourceGrantCommand) (resourcedomain.ResourceGrant, error)
|
RevokeResourceGrant(ctx context.Context, command resourcedomain.RevokeResourceGrantCommand) (resourcedomain.ResourceGrant, error)
|
||||||
ListResourceGrants(ctx context.Context, query resourcedomain.ListResourceGrantsQuery) ([]resourcedomain.ResourceGrant, int64, error)
|
ListResourceGrants(ctx context.Context, query resourcedomain.ListResourceGrantsQuery) ([]resourcedomain.ResourceGrant, int64, error)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -453,6 +453,19 @@ func (s *Service) ListResourceGrants(ctx context.Context, query resourcedomain.L
|
|||||||
return s.repository.ListResourceGrants(ctx, query)
|
return s.repository.ListResourceGrants(ctx, query)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetResourceGrant 只按当前 app_code 读取一个精确 grant,避免异步消费者分页扫描后误拿同用户的其它活动奖励。
|
||||||
|
func (s *Service) GetResourceGrant(ctx context.Context, appCode string, grantID string) (resourcedomain.ResourceGrant, error) {
|
||||||
|
if s.repository == nil {
|
||||||
|
return resourcedomain.ResourceGrant{}, xerr.New(xerr.Unavailable, "wallet repository is not configured")
|
||||||
|
}
|
||||||
|
appCode = appcode.Normalize(appCode)
|
||||||
|
grantID = strings.TrimSpace(grantID)
|
||||||
|
if grantID == "" {
|
||||||
|
return resourcedomain.ResourceGrant{}, xerr.New(xerr.InvalidArgument, "grant_id is required")
|
||||||
|
}
|
||||||
|
return s.repository.GetResourceGrant(appcode.WithContext(ctx, appCode), grantID)
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) ListResourceShopItems(ctx context.Context, query resourcedomain.ListResourceShopItemsQuery) ([]resourcedomain.ResourceShopItem, int64, error) {
|
func (s *Service) ListResourceShopItems(ctx context.Context, query resourcedomain.ListResourceShopItemsQuery) ([]resourcedomain.ResourceShopItem, int64, error) {
|
||||||
if s.repository == nil {
|
if s.repository == nil {
|
||||||
return nil, 0, xerr.New(xerr.Unavailable, "wallet repository is not configured")
|
return nil, 0, xerr.New(xerr.Unavailable, "wallet repository is not configured")
|
||||||
|
|||||||
@ -311,6 +311,14 @@ func (s *Server) GrantResourceGroup(ctx context.Context, req *walletv1.GrantReso
|
|||||||
return &walletv1.ResourceGrantResponse{Grant: resourceGrantToProto(grant)}, nil
|
return &walletv1.ResourceGrantResponse{Grant: resourceGrantToProto(grant)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Server) GetResourceGrant(ctx context.Context, req *walletv1.GetResourceGrantRequest) (*walletv1.ResourceGrantResponse, error) {
|
||||||
|
grant, err := s.svc.GetResourceGrant(ctx, req.GetAppCode(), req.GetGrantId())
|
||||||
|
if err != nil {
|
||||||
|
return nil, xerr.ToGRPCError(err)
|
||||||
|
}
|
||||||
|
return &walletv1.ResourceGrantResponse{Grant: resourceGrantToProto(grant)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Server) PinResourceGroupSnapshot(ctx context.Context, req *walletv1.PinResourceGroupSnapshotRequest) (*walletv1.PinResourceGroupSnapshotResponse, error) {
|
func (s *Server) PinResourceGroupSnapshot(ctx context.Context, req *walletv1.PinResourceGroupSnapshotRequest) (*walletv1.PinResourceGroupSnapshotResponse, error) {
|
||||||
item, err := s.svc.PinResourceGroupSnapshot(ctx, resourcedomain.PinResourceGroupSnapshotCommand{
|
item, err := s.svc.PinResourceGroupSnapshot(ctx, resourcedomain.PinResourceGroupSnapshotCommand{
|
||||||
AppCode: req.GetAppCode(), GroupID: req.GetGroupId(), PinKey: req.GetPinKey(), OperatorUserID: req.GetOperatorUserId(),
|
AppCode: req.GetAppCode(), GroupID: req.GetGroupId(), PinKey: req.GetPinKey(), OperatorUserID: req.GetOperatorUserId(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user