新版邀请活动

This commit is contained in:
sk 2024-06-21 10:12:15 +08:00
parent 992ccb280e
commit 8eb9a7c7a1
46 changed files with 1955 additions and 1365 deletions

View File

@ -660,15 +660,15 @@ const (
TaskTypePay = 7 // 充值金额
TaskTypeWinOrLose = 8 // 游戏输赢金币数量
TaskTypeTienlenCount = 9 // tienlen游戏场次
TaskTypeBindInviter = 10 // 绑定邀请人数量
TaskTypeBindInviter = 10 // 绑定邀请人数量*
TaskTypeWinCoin = 11 // 赢取金币数量
TaskTypeTienlenWinTimes = 12 // tienlen游戏赢取次数
TaskTypeInviteScore = 13 // 邀请积分
TaskTypeInviteScore = 13 // 邀请积分*
TaskTypeActivityScore = 14 // 周活跃积分数量
TaskTypeFirstLogin = 15 // 每日首次登录
TaskTypeInviteNum = 16 // 邀请绑定数量
TaskTypeInviteNum = 16 // 邀请绑定数量*
TaskTypeTurnplate = 17 // 转盘抽奖次数
TaskTypeInviteRecharge = 18 // 被邀请人充值金额
TaskTypeInviteRecharge = 18 // 被邀请人充值金额*
)
const (
@ -689,17 +689,12 @@ const (
const HeadRange = 3 // 机器人头像id范围
const (
InviteScoreTypeBind = 1 // 绑定邀请码
InviteScoreTypeLogin = 2 // 每日登录
InviteScoreTypePlayTimes = 3 // 每日参与任意游戏
InviteScoreTypeRecharge = 4 // 充值
InviteScoreTypeGameTimes = 5 // 每局游戏
InviteScoreCheckWeek = -1 // 跨周
InviteScoreTypeBind = 1 // 绑定邀请码
InviteScoreTypePay = 2 // 充值
InviteScoreTypeRecharge = 3 // 充值完成
)
const TaskIDInvitePlayGame = 1000001
const TaskIDInviteRecharge = 1000002
const TaskIDInviteFirstLogin = 1000003
func InMatchChannel(ls []string, n string) bool {
if n == "" || len(ls) == 0 {
return false
@ -749,10 +744,6 @@ const (
var PetIDs = []int32{PetIDChicken}
const (
InviteScoreRecharge = 10000 // 用户每充值$1邀请人获得积分
)
const (
ChannelSwitchExchange = 1
ChannelSwitchDropItem = 2

View File

@ -143,3 +143,39 @@ func InTimeRange(beginHour, beginMinute, endHour, endMinute, checkHour, checkMin
checkTime := checkHour*100 + checkMinute
return beginTime <= checkTime && checkTime <= endTime
}
func GetWeekTimestamp() []int64 {
now := time.Now().Local()
year, month, day := now.Date()
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
// 本周起始日期(周日)
st := today.AddDate(0, 0, -int(today.Weekday())).Unix()
et := today.AddDate(0, 0, 7-int(today.Weekday())).Unix()
return []int64{st, et}
}
func GetWeekStartTs(ts int64) int64 {
now := time.Unix(ts, 0).Local()
year, month, day := now.Date()
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
// 本周起始日期(周日)
st := today.AddDate(0, 0, -int(today.Weekday())).Unix()
return st
}
func GetMonthTimestamp() []int64 {
now := time.Now().Local()
year, month, _ := now.Date()
// 本月起始日期
st := time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
// 计算下个月的年和月
if month == time.December {
year = year + 1
month = time.January
} else {
month = month + 1
}
// 构建下个月的第一天的时间
et := time.Date(year, month, 1, 0, 0, 0, 0, now.Location()).Unix()
return []int64{st, et}
}

Binary file not shown.

View File

@ -2503,6 +2503,118 @@
"Location": "0",
"Describe": "可联系客服兑换实物奖励",
"Entity": 9
},
{
"Id": 30008,
"Name": "1元话费直兑券",
"ShowLocation": [
1,
1
],
"Classify": [
0,
0,
0
],
"Type": 17,
"Effect0": [
1,
0,
0
],
"Effect": [
1,
0,
0
],
"CompositionMax": 1,
"Location": "0",
"Describe": "用途:话费兑换码\n产出途径七日累签进阶奖励",
"Num": 1
},
{
"Id": 30009,
"Name": "2元话费直兑券",
"ShowLocation": [
1,
1
],
"Classify": [
0,
0,
0
],
"Type": 17,
"Effect0": [
1,
0,
0
],
"Effect": [
1,
0,
0
],
"CompositionMax": 1,
"Location": "0",
"Describe": "用途:话费兑换码\n产出途径七日累签进阶奖励",
"Num": 2
},
{
"Id": 30010,
"Name": "5元话费直兑券",
"ShowLocation": [
1,
1
],
"Classify": [
0,
0,
0
],
"Type": 17,
"Effect0": [
1,
0,
0
],
"Effect": [
1,
0,
0
],
"CompositionMax": 1,
"Location": "0",
"Describe": "用途:话费兑换码\n产出途径七日累签进阶奖励",
"Num": 5
},
{
"Id": 30011,
"Name": "10元话费直兑券",
"ShowLocation": [
1,
1
],
"Classify": [
0,
0,
0
],
"Type": 17,
"Effect0": [
1,
0,
0
],
"Effect": [
1,
0,
0
],
"CompositionMax": 1,
"Location": "0",
"Describe": "用途:话费兑换码\n产出途径七日累签进阶奖励",
"Num": 10
}
]
}

View File

@ -1,56 +1,55 @@
Ð ±ê(2
ˆ' ±ê(J2
<10>N ±ê(•2
˜u ±ê(ß2
 œ ±ê(©2
¨Ã ±ê(ó2
°ê ±ê(¾2
¸ ±ê(ˆ2
 À¸ ±ê(Ò2
Ð ±ê(2
ˆ' ±ê(12
<10>N ±ê(c2
˜u ±ê(2
 œ ±ê(Æ2
¨Ã ±ê(÷2
°ê ±ê(©2
¸ ±ê(Û2
 À¸ ±ê(Œ2

Èß ±ê2
 І ±ê2
 Ø­ ±ê2
 àÔ ±ê2
èû ±ê2
𢠱ê(<28>2
øÉ ±ê2
€ñ ±ê(¤ 2
ˆ˜ ±ê(î 2
<10>¿ ±ê
2
˜æ ±ê 2
 <> ±ê 2
ð“ ±ê(´2
Àš ±ê2
<10>¡ ±ê(<28>2
à§ ±ê(ç"2
°® ±ê(Î(2
€µ ±ê(´.2
л ±ê(42
 Â ±ê(<28>:2
ðÈ! ±ê(è?2
ÀÏ$ ±ê(ÎE2
 <10>Ö' ±ê(µK2
!àÜ* ±ê(<28>N2
"°ã- ±ê(<28>N2
#€ê0 ±ê(<28>N2
$Ðð3 ±ê(<28>N2
% ÷6 ±ê(<28>N2
&ðý9 ±ê(<28>N2
'À„= ±ê(<28>N2
(€‰z ±ê(<28>N2
)À–± ±ê(<28>N2
*€­â ±ê(<28>N2 
+ÀÓ ±ê(<28>N2
,€ÚÄ ±ê(<28>N2
-Àðõ ±ê(<28>N2#'
.€‡§ ±ê(<28>N2+/
/À<>Ø ±ê(<28>N226
0€´‰ ±ê(<28>N29=
1Àʺ ±ê(<28>N2AE
2€áë ±ê(<28>N2HL
3€Â×/ ±ê(<28>N2
4€£ÃG ±ê(<28>N2Ýá
5€„¯_ ±ê(<28>N2§«
Èß ±ê2
 І ±ê2
 Ø­ ±ê2
 àÔ ±ê2
èû ±ê2
𢠱ê2
øÉ ±ê2
€ñ ±ê(˜2
ˆ˜ ±ê2
<10>¿ ±ê2
˜æ ±ê(­2
 <> ±ê2
ð“ ±ê 2
Àš ±ê2
<10>¡ ±ê2
à§ ±ê2
°® ±ê(‰2
€µ ±ê2
л ±ê(ç"2
 Â ±ê(Ö&2
ðÈ! ±ê(Å*2
ÀÏ$ ±ê(´.2
 <10>Ö' ±ê(£22
!àÜ* ±ê(ë32
"°ã- ±ê(³52
#€ê0 ±ê(û62
$Ðð3 ±ê(Ã82
% ÷6 ±ê(:2
&ðý9 ±ê(Ó;2
'À„= ±ê(=2
(€‰z ±ê(ã>2
)À–± ±ê(«@2
*€­â ±ê(<28>N2
+ÀÓ ±ê(<28>N2
,€ÚÄ ±ê(<28>N2
-Àðõ ±ê(<28>N2
.€‡§ ±ê(<28>N2$
/À<>Ø ±ê(<28>N2$*
0€´‰ ±ê(<28>N2)0
1Àʺ ±ê(<28>N2.6
2€áë ±ê(<28>N23<
3€Â×/ ±ê(<28>N2e{
4€£ÃG ±ê(<28>N2¤
5€„¯_ ±ê(<28>N2Çö

View File

@ -4,7 +4,7 @@
"Id": 1,
"Bet": 2000,
"ItemId1": 30001,
"Rate1": 30,
"Rate1": 20,
"Amount1": [
1,
1
@ -14,7 +14,7 @@
"Id": 2,
"Bet": 5000,
"ItemId1": 30001,
"Rate1": 74,
"Rate1": 49,
"Amount1": [
1,
1
@ -24,7 +24,7 @@
"Id": 3,
"Bet": 10000,
"ItemId1": 30001,
"Rate1": 149,
"Rate1": 99,
"Amount1": [
1,
1
@ -34,7 +34,7 @@
"Id": 4,
"Bet": 15000,
"ItemId1": 30001,
"Rate1": 223,
"Rate1": 149,
"Amount1": [
1,
1
@ -44,7 +44,7 @@
"Id": 5,
"Bet": 20000,
"ItemId1": 30001,
"Rate1": 297,
"Rate1": 198,
"Amount1": [
1,
1
@ -54,7 +54,7 @@
"Id": 6,
"Bet": 25000,
"ItemId1": 30001,
"Rate1": 371,
"Rate1": 247,
"Amount1": [
1,
1
@ -64,7 +64,7 @@
"Id": 7,
"Bet": 30000,
"ItemId1": 30001,
"Rate1": 446,
"Rate1": 297,
"Amount1": [
1,
1
@ -74,7 +74,7 @@
"Id": 8,
"Bet": 35000,
"ItemId1": 30001,
"Rate1": 520,
"Rate1": 347,
"Amount1": [
1,
1
@ -84,7 +84,7 @@
"Id": 9,
"Bet": 40000,
"ItemId1": 30001,
"Rate1": 594,
"Rate1": 396,
"Amount1": [
1,
1
@ -94,7 +94,7 @@
"Id": 10,
"Bet": 45000,
"ItemId1": 30001,
"Rate1": 668,
"Rate1": 445,
"Amount1": [
1,
1
@ -104,7 +104,7 @@
"Id": 11,
"Bet": 50000,
"ItemId1": 30001,
"Rate1": 743,
"Rate1": 495,
"Amount1": [
1,
1
@ -114,7 +114,7 @@
"Id": 12,
"Bet": 55000,
"ItemId1": 30001,
"Rate1": 817,
"Rate1": 545,
"Amount1": [
1,
1
@ -124,7 +124,7 @@
"Id": 13,
"Bet": 60000,
"ItemId1": 30001,
"Rate1": 891,
"Rate1": 594,
"Amount1": [
1,
1
@ -134,7 +134,7 @@
"Id": 14,
"Bet": 65000,
"ItemId1": 30001,
"Rate1": 965,
"Rate1": 643,
"Amount1": [
1,
1
@ -144,7 +144,7 @@
"Id": 15,
"Bet": 70000,
"ItemId1": 30001,
"Rate1": 1040,
"Rate1": 693,
"Amount1": [
1,
1
@ -154,7 +154,7 @@
"Id": 16,
"Bet": 75000,
"ItemId1": 30001,
"Rate1": 1114,
"Rate1": 743,
"Amount1": [
1,
1
@ -164,7 +164,7 @@
"Id": 17,
"Bet": 80000,
"ItemId1": 30001,
"Rate1": 1188,
"Rate1": 792,
"Amount1": [
1,
1
@ -174,7 +174,7 @@
"Id": 18,
"Bet": 85000,
"ItemId1": 30001,
"Rate1": 1262,
"Rate1": 841,
"Amount1": [
1,
1
@ -184,7 +184,7 @@
"Id": 19,
"Bet": 90000,
"ItemId1": 30001,
"Rate1": 1337,
"Rate1": 891,
"Amount1": [
1,
1
@ -194,7 +194,7 @@
"Id": 20,
"Bet": 95000,
"ItemId1": 30001,
"Rate1": 1411,
"Rate1": 941,
"Amount1": [
1,
1
@ -204,7 +204,7 @@
"Id": 21,
"Bet": 100000,
"ItemId1": 30001,
"Rate1": 1485,
"Rate1": 990,
"Amount1": [
1,
1
@ -214,7 +214,7 @@
"Id": 22,
"Bet": 150000,
"ItemId1": 30001,
"Rate1": 2228,
"Rate1": 1485,
"Amount1": [
1,
1
@ -224,7 +224,7 @@
"Id": 23,
"Bet": 200000,
"ItemId1": 30001,
"Rate1": 2970,
"Rate1": 1980,
"Amount1": [
1,
1
@ -234,7 +234,7 @@
"Id": 24,
"Bet": 250000,
"ItemId1": 30001,
"Rate1": 3713,
"Rate1": 2475,
"Amount1": [
1,
1
@ -244,170 +244,170 @@
"Id": 25,
"Bet": 300000,
"ItemId1": 30001,
"Rate1": 4455,
"Rate1": 2970,
"Amount1": [
1,
2
1
]
},
{
"Id": 26,
"Bet": 350000,
"ItemId1": 30001,
"Rate1": 5198,
"Rate1": 3465,
"Amount1": [
1,
2
1
]
},
{
"Id": 27,
"Bet": 400000,
"ItemId1": 30001,
"Rate1": 5940,
"Rate1": 3960,
"Amount1": [
1,
2
1
]
},
{
"Id": 28,
"Bet": 450000,
"ItemId1": 30001,
"Rate1": 6683,
"Rate1": 4455,
"Amount1": [
1,
2
1
]
},
{
"Id": 29,
"Bet": 500000,
"ItemId1": 30001,
"Rate1": 7425,
"Rate1": 4950,
"Amount1": [
1,
2
1
]
},
{
"Id": 30,
"Bet": 550000,
"ItemId1": 30001,
"Rate1": 8168,
"Rate1": 5445,
"Amount1": [
1,
2
1
]
},
{
"Id": 31,
"Bet": 600000,
"ItemId1": 30001,
"Rate1": 8910,
"Rate1": 5940,
"Amount1": [
1,
2
1
]
},
{
"Id": 32,
"Bet": 650000,
"ItemId1": 30001,
"Rate1": 9653,
"Rate1": 6435,
"Amount1": [
1,
2
1
]
},
{
"Id": 33,
"Bet": 700000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 6635,
"Amount1": [
1,
2
1
]
},
{
"Id": 34,
"Bet": 750000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 6835,
"Amount1": [
1,
2
1
]
},
{
"Id": 35,
"Bet": 800000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 7035,
"Amount1": [
1,
2
1
]
},
{
"Id": 36,
"Bet": 850000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 7235,
"Amount1": [
1,
2
1
]
},
{
"Id": 37,
"Bet": 900000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 7435,
"Amount1": [
1,
2
1
]
},
{
"Id": 38,
"Bet": 950000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 7635,
"Amount1": [
1,
2
1
]
},
{
"Id": 39,
"Bet": 1000000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 7835,
"Amount1": [
1,
2
1
]
},
{
"Id": 40,
"Bet": 2000000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 8035,
"Amount1": [
1,
5
3
]
},
{
"Id": 41,
"Bet": 5000000,
"ItemId1": 30001,
"Rate1": 10000,
"Rate1": 8235,
"Amount1": [
5,
9
4,
6
]
},
{
@ -416,8 +416,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
13,
17
11,
13
]
},
{
@ -426,8 +426,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
20,
24
16,
18
]
},
{
@ -436,8 +436,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
28,
32
21,
24
]
},
{
@ -446,8 +446,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
35,
39
24,
29
]
},
{
@ -456,8 +456,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
43,
47
31,
36
]
},
{
@ -466,8 +466,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
50,
54
36,
42
]
},
{
@ -476,8 +476,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
57,
61
41,
48
]
},
{
@ -486,8 +486,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
65,
69
46,
54
]
},
{
@ -496,8 +496,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
72,
76
51,
60
]
},
{
@ -506,8 +506,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
147,
151
101,
123
]
},
{
@ -516,8 +516,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
221,
225
150,
164
]
},
{
@ -526,8 +526,8 @@
"ItemId1": 30001,
"Rate1": 10000,
"Amount1": [
295,
299
199,
246
]
}
]

Binary file not shown.

Binary file not shown.

View File

@ -146,8 +146,8 @@
"TargetTimes": 1,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
}
},
{
@ -158,8 +158,8 @@
"TargetTimes": 10,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"GameType": 1
},
@ -171,7 +171,7 @@
"TargetTimes": 10000000,
"FinishTimes": 1,
"Award": {
"100001": 1000000
"100001": 100000
}
},
{
@ -182,8 +182,8 @@
"TargetTimes": 10,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"GameType": 1
},
@ -195,8 +195,8 @@
"TargetTimes": 3,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 10
"100001": 1000000,
"100002": 1
}
},
{
@ -207,7 +207,7 @@
"TargetTimes": 10,
"FinishTimes": 1,
"Award": {
"100001": 250000,
"100001": 25000,
"50001": 1
}
},
@ -219,7 +219,7 @@
"TargetTimes": 5,
"FinishTimes": 1,
"Award": {
"100001": 2500000,
"100001": 250000,
"50001": 2
}
},
@ -231,7 +231,7 @@
"TargetTimes": 10,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100001": 500000,
"50001": 4
}
},
@ -243,7 +243,7 @@
"TargetTimes": 100,
"FinishTimes": 1,
"Award": {
"100001": 2500000,
"100001": 250000,
"50001": 2
}
},
@ -255,7 +255,7 @@
"TargetTimes": 500,
"FinishTimes": 1,
"Award": {
"100001": 12500000,
"100001": 1250000,
"50001": 10
}
},
@ -267,7 +267,7 @@
"TargetTimes": 1000,
"FinishTimes": 1,
"Award": {
"100001": 25000000,
"100001": 2500000,
"50001": 20
}
},
@ -279,8 +279,8 @@
"TargetTimes": 10000,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 20
"100001": 100000,
"100002": 2
}
},
{
@ -291,8 +291,8 @@
"TargetTimes": 50000,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 20
"100001": 1000000,
"100002": 2
}
},
{
@ -303,8 +303,8 @@
"TargetTimes": 200000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 50
"100001": 2000000,
"100002": 5
}
},
{
@ -315,8 +315,8 @@
"TargetTimes": 1000000,
"FinishTimes": 1,
"Award": {
"100001": 50000000,
"100002": 100
"100001": 5000000,
"100002": 10
}
},
{
@ -327,8 +327,8 @@
"TargetTimes": 100000000,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"GameType": 1
},
@ -340,8 +340,8 @@
"TargetTimes": 1000000000,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100002": 20
"100001": 200000,
"100002": 2
},
"GameType": 1
},
@ -353,8 +353,8 @@
"TargetTimes": 10000000000,
"FinishTimes": 1,
"Award": {
"100001": 3000000,
"100002": 30
"100001": 300000,
"100002": 3
},
"GameType": 1
},
@ -366,8 +366,8 @@
"TargetTimes": 100000000000,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100002": 50
"100001": 500000,
"100002": 5
},
"GameType": 1
},
@ -379,8 +379,8 @@
"TargetTimes": 500000000000,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 100
"100001": 1000000,
"100002": 10
},
"GameType": 1
},
@ -392,8 +392,8 @@
"TargetTimes": 1000000000000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 200
"100001": 2000000,
"100002": 20
},
"GameType": 1
},
@ -405,8 +405,8 @@
"TargetTimes": 100,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"GameType": 1
},
@ -418,8 +418,8 @@
"TargetTimes": 1000,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100002": 20
"100001": 200000,
"100002": 2
},
"GameType": 1
},
@ -431,8 +431,8 @@
"TargetTimes": 5000,
"FinishTimes": 1,
"Award": {
"100001": 3000000,
"100002": 30
"100001": 300000,
"100002": 3
},
"GameType": 1
},
@ -444,8 +444,8 @@
"TargetTimes": 10000,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100002": 50
"100001": 500000,
"100002": 5
},
"GameType": 1
},
@ -457,8 +457,8 @@
"TargetTimes": 50000,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 100
"100001": 1000000,
"100002": 10
},
"GameType": 1
},
@ -470,8 +470,8 @@
"TargetTimes": 100000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 200
"100001": 2000000,
"100002": 20
},
"GameType": 1
},
@ -483,8 +483,8 @@
"TargetTimes": 100,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"GameType": 1
},
@ -496,8 +496,8 @@
"TargetTimes": 1000,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100002": 20
"100001": 200000,
"100002": 2
},
"GameType": 1
},
@ -509,8 +509,8 @@
"TargetTimes": 5000,
"FinishTimes": 1,
"Award": {
"100001": 3000000,
"100002": 30
"100001": 300000,
"100002": 3
},
"GameType": 1
},
@ -522,8 +522,8 @@
"TargetTimes": 10000,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100002": 50
"100001": 500000,
"100002": 5
},
"GameType": 1
},
@ -535,8 +535,8 @@
"TargetTimes": 50000,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 100
"100001": 1000000,
"100002": 10
},
"GameType": 1
},
@ -548,8 +548,8 @@
"TargetTimes": 100000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 200
"100001": 2000000,
"100002": 20
},
"GameType": 1
},
@ -561,8 +561,8 @@
"TargetTimes": 100,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"GameType": 1
},
@ -574,8 +574,8 @@
"TargetTimes": 1000,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100002": 20
"100001": 200000,
"100002": 2
},
"GameType": 1
},
@ -587,8 +587,8 @@
"TargetTimes": 5000,
"FinishTimes": 1,
"Award": {
"100001": 3000000,
"100002": 30
"100001": 300000,
"100002": 3
},
"GameType": 1
},
@ -600,8 +600,8 @@
"TargetTimes": 10000,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100002": 50
"100001": 500000,
"100002": 5
},
"GameType": 1
},
@ -613,8 +613,8 @@
"TargetTimes": 50000,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 100
"100001": 1000000,
"100002": 10
},
"GameType": 1
},
@ -626,8 +626,8 @@
"TargetTimes": 100000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 200
"100001": 2000000,
"100002": 20
},
"GameType": 1
},
@ -639,8 +639,8 @@
"TargetTimes": 10,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
},
"Position": [
1,
@ -655,8 +655,8 @@
"TargetTimes": 100,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100002": 20
"100001": 200000,
"100002": 2
},
"Position": [
1,
@ -671,8 +671,8 @@
"TargetTimes": 1000,
"FinishTimes": 1,
"Award": {
"100001": 3000000,
"100002": 30
"100001": 300000,
"100002": 3
},
"Position": [
1,
@ -687,8 +687,8 @@
"TargetTimes": 10000,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100002": 50
"100001": 500000,
"100002": 5
},
"Position": [
1,
@ -703,8 +703,8 @@
"TargetTimes": 50000,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 100
"100001": 1000000,
"100002": 10
},
"Position": [
1,
@ -719,8 +719,8 @@
"TargetTimes": 100000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 200
"100001": 2000000,
"100002": 20
},
"Position": [
1,
@ -735,8 +735,8 @@
"TargetTimes": 10,
"FinishTimes": 1,
"Award": {
"100001": 1000000,
"100002": 10
"100001": 100000,
"100002": 1
}
},
{
@ -747,8 +747,8 @@
"TargetTimes": 20,
"FinishTimes": 1,
"Award": {
"100001": 2000000,
"100002": 20
"100001": 200000,
"100002": 2
}
},
{
@ -759,8 +759,8 @@
"TargetTimes": 50,
"FinishTimes": 1,
"Award": {
"100001": 3000000,
"100002": 30
"100001": 300000,
"100002": 3
}
},
{
@ -771,8 +771,8 @@
"TargetTimes": 100,
"FinishTimes": 1,
"Award": {
"100001": 5000000,
"100002": 50
"100001": 500000,
"100002": 5
}
},
{
@ -783,8 +783,8 @@
"TargetTimes": 500,
"FinishTimes": 1,
"Award": {
"100001": 10000000,
"100002": 100
"100001": 1000000,
"100002": 10
}
},
{
@ -795,8 +795,8 @@
"TargetTimes": 1000,
"FinishTimes": 1,
"Award": {
"100001": 20000000,
"100002": 200
"100001": 2000000,
"100002": 20
}
}
]

View File

@ -23,5 +23,5 @@
"ClosePreCreateRoom": true,
"AgoraAddress": "http://47.105.78.29:8081",
"InviteUrl": "http://47.105.78.29:8000/",
"RankTimeout": 5
"RankTimeout": 2
}

View File

@ -2,65 +2,204 @@ package mq
import (
"encoding/json"
"fmt"
"errors"
"time"
"github.com/astaxie/beego/cache"
"mongo.games.com/goserver/core/broker"
"mongo.games.com/goserver/core/broker/rabbitmq"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common"
"mongo.games.com/game/dbproxy/svc"
"mongo.games.com/game/model"
"mongo.games.com/game/mq"
rankproto "mongo.games.com/game/protocol/rank"
)
var InviteNumCache = cache.NewMemoryCache()
func init() {
mq.RegisterSubscriber(model.EvtBindInvite, func(e broker.Event) (err error) {
mq.RegisterSubscriber(model.EvtInvite, func(e broker.Event) (err error) {
msg := e.Message()
if msg != nil {
defer func() {
e.Ack()
}()
var log model.BindInvite
var log model.EvtInviteMsg
err = json.Unmarshal(msg.Body, &log)
if err != nil {
logger.Logger.Errorf("EvtInvite json.Unmarshal error:%v msg:%v", err, string(msg.Body))
return
}
logger.Logger.Tracef("EvtInvite log:%+v", log)
// 绑定
err = svc.BindInviteSnId(log.Platform, log.SnId, log.InviteSnId, log.Ts)
if err != nil {
logger.Logger.Errorf("BindInviteSnId error:%v", err)
return err
now := time.Unix(log.Ts, 0).Local() // 数据创建时间
get := func(snid int32) (*model.EvtInviteAckMsg, error) {
if snid == 0 {
return nil, errors.New("not found")
}
n := new(model.EvtInviteAckMsg)
n.Platform = log.Platform
n.Snid = snid
n.Score, n.Num, n.Money, _, err = svc.GetInviteData(log.Platform, snid)
return n, err
}
name := fmt.Sprintf("%v", log.InviteSnId)
b := InviteNumCache.Get(name)
n, _ := b.(int32)
if n > 0 {
n++
} else {
n, err = svc.GetInviteNum(log.Platform, log.InviteSnId, int32(rankproto.RankInvite_InviteType_Total))
// 增加积分
add := func(snid int32, score, money, rate int64) error {
if snid == 0 {
return nil
}
err = svc.AddInviteScore(log.Platform, snid, score*rate/10000, money, now)
if err != nil {
logger.Logger.Errorf("BindInviteSnId error:%v", err)
logger.Logger.Errorf("EvtInvite add error:%v snid:%v score:%v rate:%v", err, snid, score, rate)
return err
}
msg, err := get(snid)
if err != nil {
logger.Logger.Errorf("EvtInvite add find error:%v snid:%v score:%v rate:%v", err, snid, score, rate)
return err
}
mq.Send(model.EvtInviteAck, msg)
return nil
}
// 重置积分
reset := func(snid int32) error {
if snid == 0 {
return nil
}
_, _, _, ts, err := svc.GetInviteData(log.Platform, snid) // 上次更新时间
if err != nil {
logger.Logger.Errorf("EvtInvite GetInviteData error:%v snid:%v", err, snid)
return err
}
inSameWeek := common.InSameWeek(ts, now)
if !inSameWeek {
err = svc.ClearInviteScore(log.Platform, snid, now)
if err != nil {
logger.Logger.Errorf("EvtInvite ClearInviteScore error:%v snid:%v", err, snid)
return err
}
msg, err := get(snid)
if err != nil {
logger.Logger.Errorf("EvtInvite get error:%v snid:%v", err, snid)
return err
}
msg.Score = 0
mq.Send(model.EvtInviteAck, msg)
}
return nil
}
// 当前玩家积分是否跨周重置
err = reset(log.SnId)
if err != nil {
logger.Logger.Errorf("EvtInvite reset 1 error:%v snid:%v", err, log.SnId)
return err
}
// 父节点积分是否跨周重置
// 一级
err = reset(log.InviteSnId)
if err != nil {
logger.Logger.Errorf("EvtInvite reset 2 error:%v snid:%v", err, log.InviteSnId)
return err
}
// 二级
ppsnid, err := svc.GetPSnId(log.Platform, log.InviteSnId)
if err != nil {
logger.Logger.Errorf("EvtInvite GetPSnId 1 error:%v snid:%v", err, log.InviteSnId)
return err
}
if ppsnid > 0 {
err = reset(ppsnid)
if err != nil {
logger.Logger.Errorf("EvtInvite reset 3 error:%v snid:%v", err, ppsnid)
return err
}
}
InviteNumCache.Put(name, n, int64(time.Hour.Seconds()))
// 更新绑定数量
mq.Send(model.AckBindNum, &model.BindNum{
SnId: log.InviteSnId,
Num: n,
})
if log.Tp != common.InviteScoreCheckWeek {
err = svc.SaveInviteScore(&log.InviteScore, log.RechargeScore)
if err != nil {
logger.Logger.Errorf("EvtInvite SaveInviteScore error:%v msg:%+v %+v", err, log.InviteScore, log)
return err
}
}
return
switch log.Tp {
case common.InviteScoreTypeBind:
code, err := svc.GetCodeBySnId(log.Platform, log.InviteSnId)
if err != nil {
logger.Logger.Errorf("EvtInvite GetCodeBySnId error:%v %v", err, log.InviteSnId)
return err
}
// 绑定关系
err = svc.BindInviteSnId(log.Platform, log.SnId, log.InviteSnId, code)
if err != nil {
logger.Logger.Errorf("EvtInvite BindInviteSnId error:%v msg:%+v", err, log.InviteScore)
return err
}
// 更新绑定数量
// 更新邀请积分
// 1.邀请人增加积分
add(log.InviteSnId, log.Score, 0, 10000)
// 2.上级增加积分
var psnid int32
if len(log.Rate) > 0 {
psnid, err = svc.GetPSnId(log.Platform, log.InviteSnId)
if err != nil {
logger.Logger.Errorf("EvtInvite GetPSnId 2 error:%v snid:%v", err, log.InviteSnId)
return err
}
if psnid > 0 {
add(psnid, log.Score, 0, log.Rate[0])
}
}
if len(log.Rate) > 1 && psnid > 0 {
psnid, err = svc.GetPSnId(log.Platform, psnid)
if err != nil {
logger.Logger.Errorf("EvtInvite GetPSnId 2 error:%v snid:%v", err, log.InviteSnId)
return err
}
if psnid > 0 {
add(psnid, log.Score, 0, log.Rate[1])
}
}
case common.InviteScoreTypePay:
// 更新充值积分,上级积分增加
var psnid int32
if len(log.Rate) > 0 {
add(log.InviteSnId, log.Score, log.Money, log.Rate[0])
psnid, err = svc.GetPSnId(log.Platform, log.InviteSnId)
if err != nil {
logger.Logger.Errorf("EvtInvite GetPSnId 3 error:%v snid:%v", err, log.InviteSnId)
return err
}
}
if len(log.Rate) > 1 && psnid > 0 {
add(psnid, log.Score, 0, log.Rate[1])
psnid, err = svc.GetPSnId(log.Platform, psnid)
if err != nil {
logger.Logger.Errorf("EvtInvite GetPSnId 4 error:%v snid:%v", err, psnid)
return err
}
}
if len(log.Rate) > 2 && psnid > 0 {
add(psnid, log.Score, 0, log.Rate[2])
}
case common.InviteScoreTypeRecharge:
// 更新自己的积分
add(log.SnId, log.Score, log.Money, 10000)
case common.InviteScoreCheckWeek:
default:
logger.Logger.Errorf("EvtInvite tp error, %v", log.Tp)
return err
}
}
return nil
}, broker.Queue(model.EvtBindInvite), broker.DisableAutoAck(), rabbitmq.DurableQueue())
}, broker.Queue(model.EvtInvite), broker.DisableAutoAck(), rabbitmq.DurableQueue())
}

View File

@ -0,0 +1,326 @@
package svc
import (
"errors"
"net/rpc"
"sort"
"time"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common"
"mongo.games.com/game/dbproxy/mongo"
"mongo.games.com/game/model"
)
var (
InviteScoreDBName = "log"
InviteScoreCollName = "log_invitescore"
InviteScoreColError = errors.New("InviteScore collection open failed")
)
func InviteScoreCollection(plt string) *mongo.Collection {
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, InviteScoreDBName)
if s != nil {
c, first := s.DB().C(InviteScoreCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"tp"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"money"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"score"}, Background: true, Sparse: true})
}
return c
}
return nil
}
type BindScoreSvc struct {
}
func SaveInviteScore(req *model.InviteScore, rechargeScore int64) error {
logger.Logger.Tracef("SaveInviteScore req:%+v", *req)
if req.InviteSnId == 0 || req.SnId == 0 {
return nil
}
req.Id = bson.NewObjectId()
u := PlayerDataCollection(req.Platform)
if u == nil {
return PlayerColError
}
c := InviteScoreCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
// 不能重复绑定
var err error
if req.Tp == common.InviteScoreTypeBind {
a := &model.InviteScore{}
err = c.Find(bson.M{"snid": req.SnId, "tp": common.InviteScoreTypeBind}).One(a)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return errors.New("find error")
}
if err == nil && a.InviteSnId > 0 {
// 已经绑定
return errors.New("already bind")
}
}
// 必须已经绑定
if req.Tp != common.InviteScoreTypeBind {
a := &model.InviteScore{}
err = c.Find(bson.M{"snid": req.SnId, "tp": common.InviteScoreTypeBind}).One(a)
if err != nil {
// 还没有绑定上级
logger.Logger.Errorf("GetInviteScore Find BindTime error:%v", err)
return err
}
}
// 充值成功记录
if req.Tp == common.InviteScoreTypePay || req.Tp == common.InviteScoreTypeRecharge {
// 是否已经记录过
a := &model.InviteScore{}
err = c.Find(bson.M{"snid": req.SnId, "tp": common.InviteScoreTypeRecharge}).One(a)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return errors.New("find error")
}
if err == nil && a.InviteSnId > 0 {
// 已有记录
if req.Tp == common.InviteScoreTypeRecharge {
} else {
err = c.Insert(req)
if err != nil {
logger.Logger.Errorf("SaveInviteScore Insert 1 error:%v", err)
return err
}
}
} else {
// 没有充值成功记录
err = c.Insert(req)
if err != nil {
logger.Logger.Errorf("SaveInviteScore Insert 2 error:%v", err)
return err
}
req.Tp = common.InviteScoreTypeRecharge
req.Score = rechargeScore
err = c.Insert(req)
if err != nil {
logger.Logger.Errorf("SaveInviteScore InviteScoreTypeRecharge Insert error:%v", err)
return err
}
}
} else {
err = c.Insert(req)
if err != nil {
logger.Logger.Errorf("SaveInviteScore Insert 3 error:%v", err)
return err
}
}
return nil
}
// GetInviteRankList 获取周榜
func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs, ret *model.FindPlayerRankInviteListReply) error {
c := RankInviteCollection(req.Platform)
if c == nil {
return RankInviteColError
}
ret.RankType = req.RankType
var st int64
switch req.RankType {
case 1: //todo 总榜
return nil
case 2: // 本周榜
st = common.GetWeekStartTs(time.Now().Unix())
case 3: //todo 月榜
return nil
case 4: // 上周榜
st = common.GetWeekStartTs(time.Now().Unix())
st -= 7 * 24 * 3600
}
var list []*model.RankInvite
err := c.Find(bson.M{"week": st}).Sort("-score").Limit(int(model.GameParamData.RankInviteMaxNum)).All(&list)
if err != nil {
logger.Logger.Errorf("GetInviteRankList error: %v", err)
return err
}
var conds []int32
if len(list) > 0 {
type PInfo struct {
SnId int32
Name string // 昵称
Roles *model.RolePetInfo
}
var retPlayerList []PInfo
cplayerdata := PlayerDataCollection(req.Platform)
if cplayerdata == nil {
return err
}
for i := 0; i < len(list); i++ {
conds = append(conds, list[i].SnId)
}
selecter := bson.M{"snid": bson.M{"$in": conds}}
err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList)
if err != nil {
logger.Logger.Error("GetInviteRankList find player is error", err)
return err
}
for _, inviteInfo := range list {
for _, playerData := range retPlayerList {
if inviteInfo.SnId == playerData.SnId {
var RankInvite model.PlayerRankInvite
RankInvite.Name = playerData.Name
RankInvite.Score = inviteInfo.Score
RankInvite.SnId = inviteInfo.SnId
// 头像模型ID
roleId := common.DefaultRoleId
if playerData.Roles != nil {
roleId = int(playerData.Roles.ModId)
}
RankInvite.ModId = int32(roleId)
RankInvite.InviteNum = int32(inviteInfo.Num)
ret.List = append(ret.List, &RankInvite)
break
}
}
}
}
return nil
}
// GetInviteScoreByType 获取玩家排行信息
func (b *BindScoreSvc) GetInviteScoreByType(req *model.FindPlayerRankInviteScoreArgs, ret *model.FindPlayerRankInviteScoreReply) error {
c := RankInviteCollection(req.Platform)
if c == nil {
return RankInviteColError
}
ret.RankType = req.RankType
var st int64
switch req.RankType {
case 1: //todo 总榜
return nil
case 2: // 本周榜
st = common.GetWeekStartTs(time.Now().Unix())
case 3: //todo 月榜
return nil
case 4: // 上周榜
st = common.GetWeekStartTs(time.Now().Unix())
st -= 7 * 24 * 3600
}
res := new(model.RankInvite)
err := c.Find(bson.M{"week": st, "snid": req.SnId}).One(res)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
logger.Logger.Warnf("GetInviteScoreByType error: %v", err)
return err
}
type PInfo struct {
SnId int32
Name string // 昵称
Roles *model.RolePetInfo
}
var retPlayer PInfo
u := PlayerDataCollection(req.Platform)
if u == nil {
return PlayerColError
}
err = u.Find(bson.M{"snid": req.SnId}).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).One(&retPlayer)
if err != nil {
logger.Logger.Error("GetInviteScoreByType find player is error", err)
return err
}
// 头像模型ID
roleId := common.DefaultRoleId
if retPlayer.Roles != nil {
roleId = int(retPlayer.Roles.ModId)
}
ret.Data = model.PlayerRankInvite{
SnId: req.SnId,
Score: res.Score,
InviteNum: int32(res.Num),
Name: retPlayer.Name,
ModId: int32(roleId),
}
return nil
}
// GetInviteList 获取邀请列表
func (b *BindScoreSvc) GetInviteList(req *model.InviteLisArgs, ret *model.InviteListRet) error {
c := PlayerDataCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
type M struct {
Name string
Roles *model.RolePetInfo
CreateTime time.Time
SnId int32
IScore int64
IScoreTs time.Time
}
var res []*M
err := c.Find(bson.M{"psnid": req.SnId}).Select(bson.M{"snid": 1, "iscore": 1, "iscorets": 1, "name": 1, "createtime": 1, "roles": 1}).All(&res)
if err != nil {
logger.Logger.Errorf("GetInviteList error:%v", err)
return err
}
now := time.Now().Local()
for _, v := range res {
if !common.InSameWeek(now, v.IScoreTs) {
v.IScore = 0
}
roleId := common.DefaultRoleId
if v.Roles != nil && v.Roles.ModId != 0 {
roleId = int(v.Roles.ModId)
}
ret.List = append(ret.List, &model.InviteInfo{
Name: v.Name,
SnId: v.SnId,
CreateTs: v.CreateTime.Unix(),
Score: v.IScore,
ModId: int32(roleId),
})
}
sort.Slice(ret.List, func(i, j int) bool {
return ret.List[i].Score > ret.List[j].Score
})
return nil
}
//todo 每周清理数据,绑定关系不能删除
var GlobalBindScoreSvc = new(BindScoreSvc)
func init() {
rpc.Register(GlobalBindScoreSvc)
}

View File

@ -0,0 +1,55 @@
package svc
import (
"errors"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common"
"mongo.games.com/game/dbproxy/mongo"
"mongo.games.com/game/model"
)
var (
RankInviteDBName = "log"
RankInviteCollName = "log_rankinvite"
RankInviteColError = errors.New("RankInvite collection open failed")
)
func RankInviteCollection(plt string) *mongo.Collection {
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, RankInviteDBName)
if s != nil {
c, first := s.DB().C(RankInviteCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"num"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"-score"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"score"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"week", "-score"}, Background: true, Sparse: true})
}
return c
}
return nil
}
func SaveRankInvite(data *model.RankInvite) error {
c := RankInviteCollection(data.Platform)
if c == nil {
return RankInviteColError
}
data.Week = common.GetWeekStartTs(data.Ts)
_, err := c.Upsert(bson.M{"snid": data.SnId, "week": data.Week}, data)
if err != nil {
logger.Logger.Tracef("SaveRankInvite error:%v", err)
return err
}
return nil
}
//todo 每周清理数据

View File

@ -23,7 +23,7 @@ func RankPlayerCoinCollection(plt string) *mongo.Collection {
c, first := s.DB().C(RankPlayerCoinCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"coin"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"-coin"}, Background: true, Sparse: true})
}
return c
}

View File

@ -22,7 +22,7 @@ func RankPlayerLevelCollection(plt string) *mongo.Collection {
c, first := s.DB().C(RankPlayerLevelCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"exp"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"-exp"}, Background: true, Sparse: true})
}
return c
}

View File

@ -26,7 +26,7 @@ func RankSeasonCollection(plt string, rankType int32) *mongo.Collection {
c, first := s.DB().C(fmt.Sprintf("%s_%d", RankSeasonCollName, rankType))
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"isrobot", "seasonid", "score"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"isrobot", "seasonid", "-score"}, Background: true, Sparse: true})
}
return c
}

View File

@ -21,7 +21,7 @@ import (
var (
InviteCodeDBName = "user"
InviteCodeCollName = "user_invitecode"
InviteCodeCollName = "user_icode"
InviteCodeColError = errors.New("InviteCode collection open failed")
InviteCodeMutex = sync.Mutex{}
)
@ -105,6 +105,19 @@ func (i *InviteCodeSvc) GetSnIdByCode(req *model.InviteSnIdReq, ret *model.Invit
return nil
}
func GetCodeBySnId(platform string, snid int32) (string, error) {
c := InviteCodeCollection(platform)
if c == nil {
return "", InviteCodeColError
}
col := new(model.InviteCode)
err := c.Find(bson.M{"snid": snid}).One(col)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return "", err
}
return col.Code, err
}
func init() {
rpc.Register(new(InviteCodeSvc))
}

View File

@ -1,429 +0,0 @@
package svc
import (
"errors"
"net/rpc"
"time"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common"
"mongo.games.com/game/dbproxy/mongo"
"mongo.games.com/game/model"
rankproto "mongo.games.com/game/protocol/rank"
)
var (
InviteScoreDBName = "user"
InviteScoreCollName = "user_invitescore"
InviteScoreColError = errors.New("InviteScore collection open failed")
)
func InviteScoreCollection(plt string) *mongo.Collection {
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, InviteScoreDBName)
if s != nil {
c, first := s.DB().C(InviteScoreCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"tp"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"weekindex"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"monthindex"}, Background: true, Sparse: true})
}
return c
}
return nil
}
type BindScoreSvc struct {
}
func (b *BindScoreSvc) GetInviteScore(req *model.InviteScoreReq, ret *model.InviteScoreRet) error {
c := InviteScoreCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
type M struct {
Score int64
Money int64
}
var tc []M
err := c.Pipe([]bson.M{
{"$match": bson.M{
"invitesnid": req.SnId,
}},
{"$group": bson.M{
"_id": nil,
"score": bson.M{"$sum": "$score"},
"money": bson.M{"$sum": "$money"},
}},
}).AllowDiskUse().All(&tc)
if err != nil {
logger.Logger.Error("GetInviteScore AllowDiskUse is error", err)
return err
}
if len(tc) > 0 {
ret.Score = tc[0].Score
ret.Money = tc[0].Money
c := PlayerDataCollection(req.Platform)
if c == nil {
return PlayerColError
}
err = c.Update(bson.M{"snid": req.SnId}, bson.M{"$set": bson.M{"invitescore": tc[0].Score}})
if err != nil {
logger.Logger.Error("GetInviteScore update invitescore is error", err)
return err
}
}
tc = tc[:0]
err = c.Pipe([]bson.M{
{"$match": bson.M{
"invitesnid": req.SnId,
"score": bson.M{"$gt": 0},
}},
{"$group": bson.M{
"_id": nil,
"score": bson.M{"$sum": "$score"},
}},
}).AllowDiskUse().All(&tc)
if err != nil {
logger.Logger.Error("GetInviteScore z AllowDiskUse is error", err)
return err
}
if len(tc) > 0 {
ret.ZScore = tc[0].Score
}
return nil
}
func (b *BindScoreSvc) SaveInviteScore(req *model.InviteScore, ret *bool) error {
logger.Logger.Tracef("SaveInviteScore req:%+v", *req)
if req.InviteSnId == 0 {
return nil
}
req.Id = bson.NewObjectId()
u := PlayerDataCollection(req.Platform)
if u == nil {
return PlayerColError
}
type M struct {
InviteScore int64
}
r := new(M)
err := u.Find(bson.M{"snid": req.InviteSnId}).Select(bson.M{"invitescore": 1}).One(r)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
logger.Logger.Errorf("GetInviteScore Find error:%v", err)
return err
}
if req.Score < 0 {
if -req.Score > r.InviteScore {
req.Score = -r.InviteScore
}
}
c := InviteScoreCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
ts := req.Ts
if req.Tp != common.InviteScoreTypeBind {
a := &model.InviteScore{}
err = c.Find(bson.M{"snid": req.SnId, "tp": common.InviteScoreTypeBind}).One(a)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
logger.Logger.Errorf("GetInviteScore Find BindTime error:%v", err)
return err
}
ts = a.Ts
}
bindTime := time.Unix(0, ts).Local()
year, month, day := bindTime.Date()
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
// 本周起始日期(周日)
req.WeekIndex = today.AddDate(0, 0, -int(today.Weekday())).Unix()
// 本月起始日期
req.MonthIndex = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
err = c.Insert(req)
if err != nil {
logger.Logger.Errorf("SaveInviteScore Insert error:%v", err)
return err
}
err = u.Update(bson.M{"snid": req.InviteSnId}, bson.M{"$inc": bson.M{"invitescore": req.Score}})
if err != nil {
logger.Logger.Errorf("inc InviteScore error:%v", err)
return err
}
*ret = true
return nil
}
func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs, ret *model.FindPlayerRankInviteListReply) error {
c := InviteScoreCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
matchParam := bson.M{
"score": bson.M{"$gt": 0},
}
now := time.Now().Local()
startTime := now.AddDate(-100, 0, 0).UnixNano()
year, month, day := now.Date()
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
if req.RankType == int32(rankproto.RankInvite_InviteType_Week) {
// 本周起始日期(周日)
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
} else if req.RankType == int32(rankproto.RankInvite_InviteType_Month) {
// 本月起始日期
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
} else {
matchParam["ts"] = bson.M{"$gte": startTime, "$lte": now.UnixNano()}
}
type M struct {
InviteSnId int32 // 邀请人id
Score int64 // 积分
}
var tc []M
err := c.Pipe([]bson.M{
{"$match": matchParam},
{"$group": bson.M{
"_id": bson.M{
"invitesnid": "$invitesnid",
},
"invitesnid": bson.M{"$first": "$invitesnid"},
"score": bson.M{"$sum": "$score"},
}},
{
"$sort": bson.M{"ts": -1},
},
{
"$sort": bson.M{"score": -1},
},
{
"$limit": model.GameParamData.RankInviteMaxNum,
},
}).AllowDiskUse().All(&tc)
if err != nil {
logger.Logger.Error("GetInviteRankList z AllowDiskUse is error", err)
return err
}
var conds []int32
if len(tc) > 0 {
type PInfo struct {
SnId int32
Name string // 昵称
Roles *model.RolePetInfo
}
var retPlayerList []PInfo
cplayerdata := PlayerDataCollection(req.Platform)
if cplayerdata == nil {
return err
}
for i := 0; i < len(tc); i++ {
conds = append(conds, tc[i].InviteSnId)
}
selecter := bson.M{"snid": bson.M{"$in": conds}}
//err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList)
err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList)
if err != nil {
logger.Logger.Error("svc.FindInvitePlayerList is error", err)
return nil
}
for _, inviteInfo := range tc {
for _, playerData := range retPlayerList {
if inviteInfo.InviteSnId == playerData.SnId {
var RankInvite model.PlayerRankInvite
RankInvite.Name = playerData.Name
RankInvite.Score = inviteInfo.Score
RankInvite.SnId = inviteInfo.InviteSnId
// 头像模型ID
roleId := common.DefaultRoleId
if playerData.Roles != nil {
roleId = int(playerData.Roles.ModId)
}
RankInvite.ModId = int32(roleId)
RankInvite.InviteNum, _ = GetInviteNum(req.Platform, inviteInfo.InviteSnId, req.RankType)
ret.List = append(ret.List, &RankInvite)
break
}
}
}
ret.RankType = req.RankType
}
return nil
}
func (b *BindScoreSvc) GetInviteScoreByType(req *model.FindPlayerRankInviteScoreArgs, ret *model.FindPlayerRankInviteScoreReply) error {
c := InviteScoreCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
matchParam := bson.M{
"invitesnid": req.SnId,
"score": bson.M{"$gt": 0},
}
now := time.Now().Local()
startTime := now.AddDate(-100, 0, 0).UnixNano()
year, month, day := now.Date()
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
if req.RankType == int32(rankproto.RankInvite_InviteType_Week) {
// 本周起始日期(周日)
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
} else if req.RankType == int32(rankproto.RankInvite_InviteType_Month) {
// 本月起始日期
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
} else {
matchParam["ts"] = bson.M{"$gte": startTime, "$lte": now.UnixNano()}
}
type M struct {
InviteSnId int32 // 邀请人id
Score int64 // 积分
}
var tc []M
err := c.Pipe([]bson.M{
{"$match": matchParam},
{"$group": bson.M{
"_id": nil,
"invitesnid": bson.M{"$first": "$invitesnid"},
"score": bson.M{"$sum": "$score"},
}},
}).AllowDiskUse().All(&tc)
if err != nil {
logger.Logger.Error("GetInviteScoreByType z AllowDiskUse is error", err)
return err
}
type PInfo struct {
SnId int32
Name string // 昵称
Roles *model.RolePetInfo
}
var retPlayer PInfo
u := PlayerDataCollection(req.Platform)
if u == nil {
return err
}
err = u.Find(bson.M{"snid": req.SnId}).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).One(&retPlayer)
if err != nil {
logger.Logger.Error("svc.GetInviteScoreByType is error", err)
return nil
}
var rankInvite model.PlayerRankInvite
rankInvite.Name = retPlayer.Name
if len(tc) > 0 {
rankInvite.Score = tc[0].Score
}
rankInvite.SnId = req.SnId
// 头像模型ID
roleId := common.DefaultRoleId
if retPlayer.Roles != nil {
roleId = int(retPlayer.Roles.ModId)
}
rankInvite.ModId = int32(roleId)
rankInvite.InviteNum, _ = GetInviteNum(req.Platform, req.SnId, req.RankType)
ret.Data = rankInvite
ret.RankType = req.RankType
return nil
}
func (b *BindScoreSvc) GetInviteList(req *model.InviteLisArgs, ret *model.InviteListRet) error {
c := InviteScoreCollection(req.Platform)
if c == nil {
return InviteScoreColError
}
type M struct {
SnId int32
Score int64
}
var tc []M
err := c.Pipe([]bson.M{
{"$match": bson.M{
"invitesnid": req.SnId,
}},
{"$group": bson.M{
"_id": bson.M{
"snid": "$snid",
},
"snid": bson.M{"$first": "$snid"},
"score": bson.M{"$sum": "$score"},
}},
{
"$sort": bson.M{
"score": -1,
},
},
}).AllowDiskUse().All(&tc)
if err != nil {
logger.Logger.Error("GetInviteList AllowDiskUse is error", err)
return err
}
u := PlayerDataCollection(req.Platform)
if u == nil {
return PlayerColError
}
for _, v := range tc {
d := &model.PlayerBaseInfo2{}
err = u.Find(bson.M{"snid": v.SnId}).Select(bson.M{"name": 1, "createtime": 1, "roles": 1}).One(d)
if err != nil {
logger.Logger.Warnf("GetInviteList Find player is error:%v", err)
}
roleId := common.DefaultRoleId
if d.Roles != nil && d.Roles.ModId != 0 {
roleId = int(d.Roles.ModId)
}
ret.List = append(ret.List, &model.InviteInfo{
Name: d.Name,
SnId: v.SnId,
CreateTs: d.CreateTime.Unix(),
Score: v.Score,
ModId: int32(roleId),
})
}
return nil
}
func init() {
rpc.Register(new(BindScoreSvc))
}

View File

@ -21,7 +21,6 @@ import (
"mongo.games.com/game/common"
"mongo.games.com/game/dbproxy/mongo"
"mongo.games.com/game/model"
rankproto "mongo.games.com/game/protocol/rank"
)
var (
@ -40,12 +39,12 @@ func PlayerDataCollection(plt string) *mongo.Collection {
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"snid"}, Unique: true, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"tel"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitecode"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"createtime"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"-createtime"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"othercode"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"icode"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"psnid"}, Background: true, Sparse: true})
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"pcode"}, Background: true, Sparse: true})
}
return c_playerdata
}
@ -247,7 +246,7 @@ func (svc *PlayerDataSvc) CreatePlayerDataByThird(args *model.CreatePlayer, ret
func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg, ret *model.PlayerDataRet) (err error) {
cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil {
return
return PlayerColError
}
acc := args.AccId
pd := &model.PlayerData{}
@ -267,13 +266,13 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
if !bson.IsObjectIdHex(acc) {
logger.Logger.Warn("NewPlayer failed: acc is illeage ", acc)
return
return errors.New("acc is illeage")
}
var a *model.Account
a, err = _AccountSvc.getAccount(args.Plt, args.AccId)
if err != nil {
logger.Logger.Warnf("_AccountSvc.getAccount(%v,%v) failed:%v", args.Plt, args.AccId, err)
return
return err
}
id := a.SnId
@ -281,7 +280,7 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
id, err = GetOnePlayerIdFromBucket()
if err != nil {
logger.Logger.Warn("NewPlayer failed:", err)
return
return err
}
}
@ -298,21 +297,26 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
dataParams.Ip, int64(args.AddCoin), "", a.DeviceInfo, a.TagKey, a.AccountType)
pd.HeadUrl = args.HeadUrl
if pd != nil {
if pd.ICode == "" {
code, _ := GetInviteCode(pd.Platform, pd.SnId)
pd.ICode = code
pd.IScoreTs = time.Now()
}
err = cplayerdata.Insert(pd)
if err != nil {
logger.Logger.Trace("CreatePlayerDataOnRegister Insert failed:", err)
return
return err
}
ret.Pd = pd
ret.IsNew = true
return
return nil
}
return
return nil
}
if CorrectData(pd) {
}
ret.Pd = pd
return
return nil
}
func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArgs, ret *model.PlayerDataRet) (err error) {
@ -321,6 +325,30 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
return nil
}
f := func(p *model.PlayerData) {
// 更新一下绑定关系
if p.PSnId > 0 && p.PCode != "" {
return
}
c := InviteScoreCollection(args.Plt)
if c == nil {
return
}
res := new(model.InviteScore)
c.Find(bson.M{"snid": args.SnId, "tp": common.InviteScoreTypeBind}).One(res)
param := bson.M{}
if res.InviteSnId > 0 {
p.PSnId = res.InviteSnId
param["psnid"] = res.InviteSnId
code, _ := GetCodeBySnId(args.Plt, res.InviteSnId)
if code != "" {
p.PCode = code
param["pcode"] = code
}
cplayerdata.Update(bson.M{"snid": args.SnId}, bson.M{"$set": param})
}
}
var code string
err = cplayerdata.Find(bson.M{"snid": args.SnId}).One(&ret.Pd)
if err != nil {
@ -346,15 +374,16 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
pd := model.NewPlayerData(a.AccountId.Hex(), name, a.SnId, a.Channel, a.Platform, a.Params,
a.Tel, a.PackegeTag, dataParams.Ip, 0, dataParams.UnionId, a.DeviceInfo, a.TagKey, a.AccountType)
if pd != nil {
if pd.ICode == "" {
code, _ = GetInviteCode(pd.Platform, pd.SnId)
pd.ICode = code
pd.IScoreTs = time.Now()
}
err = cplayerdata.Insert(pd)
if err != nil {
logger.Logger.Errorf("GetPlayerDataBySnId Insert err:%v acc:%v snid:%v", err, a.AccountId.Hex(), a.SnId)
return err
}
if pd.InviteCode == "" {
code, err = GetInviteCode(pd.Platform, pd.SnId)
pd.InviteCode = code
}
ret.IsNew = true
ret.Pd = pd
return nil
@ -362,10 +391,13 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
}
return err
}
if ret.Pd.InviteCode == "" {
code, err = GetInviteCode(ret.Pd.Platform, ret.Pd.SnId)
ret.Pd.InviteCode = code
if ret.Pd.ICode == "" {
code, _ = GetInviteCode(ret.Pd.Platform, ret.Pd.SnId)
ret.Pd.ICode = code
ret.Pd.IScoreTs = time.Now()
cplayerdata.Update(bson.M{"snid": args.SnId}, bson.M{"icode": code, "iscorets": ret.Pd.IScoreTs})
}
f(ret.Pd)
if args.CorrectData && ret.Pd != nil {
CorrectData(ret.Pd)
}
@ -459,6 +491,12 @@ func SavePlayerData(pd *model.PlayerData) (err error) {
}
if pd != nil {
model.RecalcuPlayerCheckSum(pd)
//todo 排除字段更新,有没有更新好的方法
pd.IScore, pd.INum, pd.IMoney, pd.IScoreTs, err = GetInviteData(pd.Platform, pd.SnId)
if err != nil {
logger.Logger.Errorf("model.SavePlayerData GetInviteData %v err:%v", pd.SnId, err)
return
}
_, err = cplayerdata.Upsert(bson.M{"_id": pd.Id}, pd)
if err != nil {
logger.Logger.Errorf("model.SavePlayerData %v err:%v", pd.SnId, err)
@ -1495,87 +1533,126 @@ func (svc *PlayerDataSvc) GetPlayerInviteSnid(req *model.PlayerIsExistBySnIdArgs
}
type t struct {
InviteSnId int32
PSnId int32
}
res := &t{}
err := c.Find(bson.M{"snid": req.SnId}).Select(bson.M{"invitesnid": 1}).One(res)
err := c.Find(bson.M{"snid": req.SnId}).Select(bson.M{"psnid": 1}).One(res)
if err != nil && errors.Is(err, mgo.ErrNotFound) {
return err
}
*resp = res.InviteSnId
*resp = res.PSnId
return nil
}
func (svc *PlayerDataSvc) GetInviteNum(req *model.PlayerIsExistBySnIdArgs, resp *int32) error {
n, err := GetInviteNum(req.Plt, req.SnId, int32(rankproto.RankInvite_InviteType_Total))
if err != nil {
return err
}
*resp = n
return nil
}
func GetInviteNum(platform string, snId int32, rankType int32) (int32, error) {
var err error
var n int
switch rankType {
case int32(rankproto.RankInvite_InviteType_Week), int32(rankproto.RankInvite_InviteType_Month):
matchParam := bson.M{
"invitesnid": snId,
"tp": common.InviteScoreTypeBind,
}
now := time.Now().Local()
year, month, day := now.Date()
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
if rankType == int32(rankproto.RankInvite_InviteType_Week) {
// 本周起始日期(周日)
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
} else if rankType == int32(rankproto.RankInvite_InviteType_Month) {
// 本月起始日期
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
}
c := InviteScoreCollection(platform)
if c == nil {
return 0, InviteScoreColError
}
n, err = c.Find(matchParam).Count()
if err != nil {
return 0, err
}
default:
c := PlayerDataCollection(platform)
if c == nil {
return 0, PlayerColError
}
n, err = c.Find(bson.M{"invitesnid": snId}).Count()
if err != nil {
return 0, err
}
}
return int32(n), nil
}
func BindInviteSnId(platform string, snId, inviteSnId int32, ts int64) error {
func BindInviteSnId(platform string, snId, inviteSnId int32, code string) error {
c := PlayerDataCollection(platform)
if c == nil {
return PlayerColError
}
err := c.Update(bson.M{"snid": snId}, bson.M{"$set": bson.M{"invitesnid": inviteSnId}})
err := c.Update(bson.M{"snid": snId}, bson.M{"$set": bson.M{"psnid": inviteSnId, "pcode": code}})
if err != nil {
logger.Logger.Error("BindInviteSnId error ", err)
return err
}
err = c.Update(bson.M{"snid": inviteSnId}, bson.M{"$inc": bson.D{{"inum", 1}}})
if err != nil {
logger.Logger.Error("BindInviteSnId inc error ", err)
return err
}
return nil
}
func ClearInviteScore(platform string, snId int32, now time.Time) error {
c := PlayerDataCollection(platform)
if c == nil {
return PlayerColError
}
err := c.Update(bson.M{"snid": snId}, bson.M{"$set": bson.M{"iscore": 0, "iscorets": now}})
if err != nil {
logger.Logger.Error("ClearInviteScore error ", err)
return err
}
return nil
}
func AddInviteScore(platform string, snId int32, num, money int64, now time.Time) error {
c := PlayerDataCollection(platform)
if c == nil {
return PlayerColError
}
err := c.Update(bson.M{"snid": snId}, bson.M{"$inc": bson.M{"iscore": num, "imoney": money}, "$set": bson.M{"iscorets": now}})
if err != nil {
logger.Logger.Error("AddInviteScore error ", err)
return err
}
// 更新排行榜
type m struct {
IScore int64
INum int64
}
res := &m{}
err = c.Find(bson.M{"snid": snId}).Select(bson.M{"iscore": 1, "inum": 1}).One(res)
if err != nil {
logger.Logger.Error("AddInviteScore find error ", err)
return err
}
SaveRankInvite(&model.RankInvite{
Platform: platform,
SnId: snId,
Num: res.INum,
Score: res.IScore,
Ts: now.Unix(),
})
return nil
}
func GetInviteData(platform string, snId int32) (iscore, inum, imoney int64, iscorets time.Time, err error) {
c := PlayerDataCollection(platform)
if c == nil {
err = PlayerColError
return
}
type M struct {
IScore, Imoney, Inum int64
IScoreTs time.Time
}
res := &M{}
err = c.Find(bson.M{"snid": snId}).Select(bson.M{"iscore": 1, "inum": 1, "imoney": 1, "iscorets": 1}).One(res)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return
}
res.IScoreTs = res.IScoreTs.Local()
return res.IScore, res.Inum, res.Imoney, res.IScoreTs, nil
}
func GetPSnId(platform string, snId int32) (psnId int32, err error) {
c := PlayerDataCollection(platform)
if c == nil {
err = PlayerColError
return
}
type M struct {
PSnId int32
}
res := &M{}
err = c.Find(bson.M{"snid": snId}).Select(bson.M{"psnid": 1}).One(res)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return 0, err
}
return res.PSnId, nil
}
func CorrectData(pd *model.PlayerData) bool {
//var coinTotal int64
dirty := false

View File

@ -31,4 +31,5 @@ const (
ETCDKEY_GAME_CONFIG = "/game/plt/gameconfig/" // 游戏管理/全局配置
ETCDKEY_ACT_PHONELOTTERY = "/game/act_phoneLottery"
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
)

View File

@ -29,9 +29,9 @@ func NewBagInfo(sid int32, plt string) *BagInfo {
return &BagInfo{BagId: bson.NewObjectId(), SnId: sid, Platform: plt, BagItem: make(map[int32]*Item)}
}
func GetBagInfo(sid int32, plt string) *BagInfo {
func GetBagInfo(sid int32, plt string) (*BagInfo, error) {
if rpcCli == nil {
return nil
return nil, ErrRPClientNoConn
}
ret := &BagInfo{}
args := &GetBagInfoArgs{
@ -41,9 +41,9 @@ func GetBagInfo(sid int32, plt string) *BagInfo {
err := rpcCli.CallWithTimeout("BagSvc.GetBagItem", args, ret, time.Second*30)
if err != nil {
logger.Logger.Error("GetBagInfo err:%v SnId:%v ", err, args.SnId)
return nil
return nil, err
}
return ret
return ret, nil
}
func UpBagItem(args *BagInfo) error {

View File

@ -117,6 +117,8 @@ type AllConfig struct {
ShopInfos map[int32]*ShopInfo // 商品id:商品信息
// 渠道开关
ChannelSwitch map[int32]*webapi.ChannelSwitchConfig
// 邀请活动
*webapi.ActInviteConfig
}
type GlobalConfig struct {

View File

@ -24,6 +24,7 @@ type InviteSnIdRet struct {
SnId int32
}
// GetSnIdByCode 根据邀请码获取被邀请人id
func GetSnIdByCode(platform string, code string) (int32, error) {
if rpcCli == nil {
logger.Logger.Warnf("rpcCli is nil")
@ -47,81 +48,30 @@ func GetSnIdByCode(platform string, code string) (int32, error) {
// InviteScore 积分记录
type InviteScore struct {
Id bson.ObjectId `bson:"_id"`
Platform string // 平台id
Platform string `bson:"-"` // 平台id
SnId int32 // 被邀请人id
InviteSnId int32 // 邀请人id
Tp int32 // 积分类型 common.InviteScoreType~
Tp int32 // 积分类型 common.InviteScoreType ~
Score int64 // 积分
Ts int64 // 时间戳
Money int64 // 充值金额
WeekIndex int64 // 所在周
MonthIndex int64 // 所在月
Rate []int64 // 返佣比例
}
type InviteScoreReq struct {
// 邀请消息
const EvtInvite = "evt_invite" // 绑定邀请人 worldsrv -> dbproxy
type EvtInviteMsg struct {
InviteScore
RechargeScore int64 // 充值成功积分
}
const EvtInviteAck = "evt_invite_ack" // 绑定邀请人 dbproxy -> worldsrv
type EvtInviteAckMsg struct {
Platform string
SnId int32
}
type InviteScoreRet struct {
Score int64 // 包含扣积分
ZScore int64 // 只包含大于0的积分
Money int64 // 充值金额
}
// GetInviteScore 查询总积分
// 下级玩家所有积分
// 返回 包含扣积分只包含大于0的积分充值金额
func GetInviteScore(plt string, snid int32) (int64, int64, int64, error) {
if rpcCli == nil {
logger.Logger.Warnf("rpcCli is nil")
return 0, 0, 0, errors.New("rpcCli is nil")
}
req := &InviteScoreReq{
Platform: plt,
SnId: snid,
}
ret := &InviteScoreRet{}
err := rpcCli.CallWithTimeout("BindScoreSvc.GetInviteScore", req, ret, time.Second*30)
if err != nil {
logger.Logger.Warnf("GetInviteScore err:%v", err)
return 0, 0, 0, err
}
return ret.Score, ret.ZScore, ret.Money, err
}
// SaveInviteScore 保存积分变更记录
func SaveInviteScore(b *InviteScore) error {
if rpcCli == nil {
logger.Logger.Warnf("rpcCli is nil")
return errors.New("rpcCli is nil")
}
ret := false
err := rpcCli.CallWithTimeout("BindScoreSvc.SaveInviteScore", b, &ret, time.Second*30)
if err != nil {
logger.Logger.Warnf("SaveInviteScore err:%v", err)
return err
}
return nil
}
const EvtBindInvite = "evt_bind_invite"
const AckBindNum = "ack_bind_num"
const EvtInviteScore = "evt_invitescore"
type BindInvite struct {
Platform string
SnId int32
InviteSnId int32
Ts int64
}
type BindNum struct {
SnId int32
Num int32
Snid int32
Score int64
Money int64
Num int64
}
type InviteLisArgs struct {
@ -141,6 +91,7 @@ type InviteListRet struct {
List []*InviteInfo
}
// GetInviteList 获取邀请人列表
func GetInviteList(platform string, snid int32) ([]*InviteInfo, error) {
if rpcCli == nil {
logger.Logger.Error("model.GetInviteList rpcCli == nil")
@ -159,3 +110,12 @@ func GetInviteList(platform string, snid int32) ([]*InviteInfo, error) {
}
return ret.List, nil
}
type RankInvite struct {
Platform string `bson:"-"`
SnId int32
Num int64
Score int64
Ts int64
Week int64
}

View File

@ -449,16 +449,19 @@ type PlayerData struct {
LotteryCount int32 //抽奖次数
InitLotteryStatus bool //抽奖初始化状态
Delete int // 是否删除
InviteCode string // 邀请码
InviteSnId int32 // 邀请人
InviteScore int64 // 邀请积分
OtherCode string // 绑定的邀请码
WeekCardTime map[int32]int64 // 周卡结束时间 key:类型 value结束时间
WeekCardAward map[int32]bool // 周卡奖励领取状态false-未领取true已领取
ItemRecExpireTime int64 // 记牌器到期时间
RequestAddFriend map[int32]int64 // 玩家申请好友记录
IsTakeExpireItem bool // 是否领取
LastChannel string // 最后包类型
ICode string // 邀请码
IScore int64 // 邀请积分
PSnId int32 // 邀请人
PCode string // 绑定的邀请码
INum int64 // 邀请人数
IMoney int64 // 邀请人充值金额
IScoreTs time.Time // 邀请积分更新时间
}
// 七日签到数据
@ -655,9 +658,9 @@ func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData {
pdfw.VipExp = param.VipExp
pdfw.ShopId = common.IntSliceToInt32(param.ShopID)
pdfw.Delete = int64(param.Delete)
pdfw.InviteCode = param.InviteCode
pdfw.InviteSnId = param.InviteSnId
pdfw.InviteScore = param.InviteScore
pdfw.InviteCode = param.ICode
pdfw.InviteSnId = param.PSnId
pdfw.InviteScore = param.IScore
pdfw.Channel = param.Channel
pdfw.LastChannel = param.LastChannel
for _, v := range param.Items {
@ -1061,6 +1064,7 @@ func GetPlayerDataBySnId(plt string, snid int32, correctData, createIfNotExist b
ret.Pd.CreateTime = ret.Pd.CreateTime.Local()
ret.Pd.LastLoginTime = ret.Pd.LastLoginTime.Local()
ret.Pd.LastLogoutTime = ret.Pd.LastLogoutTime.Local()
ret.Pd.IScoreTs = ret.Pd.IScoreTs.Local()
return ret.Pd, ret.IsNew
}
@ -2685,23 +2689,6 @@ func GetPlayerInviteSnid(plt string, snid int32) (int32, error) {
return ret, nil
}
func GetInviteNum(plt string, snid int32) (int32, error) {
if rpcCli == nil {
return 0, errors.New("rpcCli is nil")
}
args := &PlayerIsExistBySnIdArgs{
Plt: plt,
SnId: snid,
}
var ret int32
err := rpcCli.CallWithTimeout("PlayerDataSvc.GetInviteNum", args, &ret, time.Second*30)
if err != nil {
logger.Logger.Error("model.GetPlayerInviteSnid error ", err)
return 0, err
}
return ret, nil
}
// 所有游戏都要加上当天统计数据
func (this *PlayerData) GetDaliyGameData(id int) (*PlayerGameStatics, *PlayerGameStatics) {
gameId := strconv.Itoa(id)

View File

@ -131,11 +131,11 @@ type PlayerRankInvite struct {
type FindPlayerRankInviteListArgs struct {
Platform string
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
}
type FindPlayerRankInviteListReply struct {
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
List []*PlayerRankInvite
}
@ -156,12 +156,12 @@ func FindPlayerRankInviteList(args *FindPlayerRankInviteListArgs) (*FindPlayerRa
type FindPlayerRankInviteScoreArgs struct {
Platform string
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
SnId int32
}
type FindPlayerRankInviteScoreReply struct {
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
Data PlayerRankInvite
}

View File

@ -5,7 +5,6 @@ const (
BackBankrupt = "log_bankrupt"
BackClientLog = "log_clientlog_mysql"
BackGameRecord = "evt_gamerec"
BackInviteScore = "evt_invitescore"
BackLogin = "evt_login"
BackOnline = "evt_online"
BackPhoneLottery = "evt_phonelottery"

View File

@ -108,11 +108,12 @@ func (Rank) EnumDescriptor() ([]byte, []int) {
type RankInvite int32
const (
RankInvite_InviteType_None RankInvite = 0
RankInvite_InviteType_Total RankInvite = 1 //总榜
RankInvite_InviteType_Week RankInvite = 2 //周榜
RankInvite_InviteType_Month RankInvite = 3 //月榜
RankInvite_InviteType_Max RankInvite = 4
RankInvite_InviteType_None RankInvite = 0
RankInvite_InviteType_Total RankInvite = 1 //总榜
RankInvite_InviteType_Week RankInvite = 2 //周榜
RankInvite_InviteType_Month RankInvite = 3 //月榜
RankInvite_InviteType_UpWeek RankInvite = 4 //上周榜
RankInvite_InviteType_Max RankInvite = 5
)
// Enum value maps for RankInvite.
@ -122,14 +123,16 @@ var (
1: "InviteType_Total",
2: "InviteType_Week",
3: "InviteType_Month",
4: "InviteType_Max",
4: "InviteType_UpWeek",
5: "InviteType_Max",
}
RankInvite_value = map[string]int32{
"InviteType_None": 0,
"InviteType_Total": 1,
"InviteType_Week": 2,
"InviteType_Month": 3,
"InviteType_Max": 4,
"InviteType_None": 0,
"InviteType_Total": 1,
"InviteType_Week": 2,
"InviteType_Month": 3,
"InviteType_UpWeek": 4,
"InviteType_Max": 5,
}
)
@ -1730,17 +1733,18 @@ var file_rank_proto_rawDesc = []byte{
0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x10, 0x9a, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9b,
0x4e, 0x2a, 0x76, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12,
0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x6f,
0x6e, 0x65, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79,
0x70, 0x65, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e,
0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02, 0x12,
0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f,
0x6e, 0x74, 0x68, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54,
0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10, 0x04, 0x42, 0x24, 0x5a, 0x22, 0x6d, 0x6f, 0x6e,
0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x72, 0x61, 0x6e, 0x6b, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x4e, 0x2a, 0x8d, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e,
0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54,
0x79, 0x70, 0x65, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49,
0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02,
0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d,
0x6f, 0x6e, 0x74, 0x68, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x70, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x04, 0x12, 0x12, 0x0a,
0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10,
0x05, 0x42, 0x24, 0x5a, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x2f, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -110,7 +110,8 @@ enum RankInvite{
InviteType_Total = 1;//
InviteType_Week = 2; //
InviteType_Month = 3;//
InviteType_Max = 4;
InviteType_UpWeek = 4;//
InviteType_Max = 5;
}
message GateTransmit {

View File

@ -5949,6 +5949,173 @@ func (x *ChannelSwitchConfig) GetOnChannelName() []string {
return nil
}
type RankAward struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=Start,proto3" json:"Start,omitempty"` // 开始积分
End int64 `protobuf:"varint,2,opt,name=End,proto3" json:"End,omitempty"` // 结束积分
Num int64 `protobuf:"varint,3,opt,name=Num,proto3" json:"Num,omitempty"` // 奖励
}
func (x *RankAward) Reset() {
*x = RankAward{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RankAward) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankAward) ProtoMessage() {}
func (x *RankAward) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[58]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RankAward.ProtoReflect.Descriptor instead.
func (*RankAward) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{58}
}
func (x *RankAward) GetStart() int64 {
if x != nil {
return x.Start
}
return 0
}
func (x *RankAward) GetEnd() int64 {
if x != nil {
return x.End
}
return 0
}
func (x *RankAward) GetNum() int64 {
if x != nil {
return x.Num
}
return 0
}
// etcd /game/act_invite
type ActInviteConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
BindScore int64 `protobuf:"varint,2,opt,name=BindScore,proto3" json:"BindScore,omitempty"` // 绑定积分
RechargeScore int64 `protobuf:"varint,3,opt,name=RechargeScore,proto3" json:"RechargeScore,omitempty"` // 充值积分,一个玩家最多给上级贡献一次
PayScore map[int64]int64 `protobuf:"bytes,4,rep,name=PayScore,proto3" json:"PayScore,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 充值积分;充值金额:获得积分
Rates []int64 `protobuf:"varint,5,rep,packed,name=Rates,proto3" json:"Rates,omitempty"` // 返佣比例;多级按顺序给
Awards1 []*RankAward `protobuf:"bytes,6,rep,name=Awards1,proto3" json:"Awards1,omitempty"` // 周榜奖励列表
Awards2 []*RankAward `protobuf:"bytes,7,rep,name=Awards2,proto3" json:"Awards2,omitempty"` // 周榜奖励列表
Awards3 []*RankAward `protobuf:"bytes,8,rep,name=Awards3,proto3" json:"Awards3,omitempty"` // 周榜奖励列表
}
func (x *ActInviteConfig) Reset() {
*x = ActInviteConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ActInviteConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ActInviteConfig) ProtoMessage() {}
func (x *ActInviteConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[59]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ActInviteConfig.ProtoReflect.Descriptor instead.
func (*ActInviteConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{59}
}
func (x *ActInviteConfig) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *ActInviteConfig) GetBindScore() int64 {
if x != nil {
return x.BindScore
}
return 0
}
func (x *ActInviteConfig) GetRechargeScore() int64 {
if x != nil {
return x.RechargeScore
}
return 0
}
func (x *ActInviteConfig) GetPayScore() map[int64]int64 {
if x != nil {
return x.PayScore
}
return nil
}
func (x *ActInviteConfig) GetRates() []int64 {
if x != nil {
return x.Rates
}
return nil
}
func (x *ActInviteConfig) GetAwards1() []*RankAward {
if x != nil {
return x.Awards1
}
return nil
}
func (x *ActInviteConfig) GetAwards2() []*RankAward {
if x != nil {
return x.Awards2
}
return nil
}
func (x *ActInviteConfig) GetAwards3() []*RankAward {
if x != nil {
return x.Awards3
}
return nil
}
var File_common_proto protoreflect.FileDescriptor
var file_common_proto_rawDesc = []byte{
@ -6908,9 +7075,39 @@ var file_common_proto_rawDesc = []byte{
0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x6e,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28,
0x09, 0x52, 0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65,
0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x45, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x74,
0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x03, 0x45, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x8e, 0x03, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x49,
0x6e, 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x69, 0x6e, 0x64, 0x53,
0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x69, 0x6e, 0x64,
0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67,
0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x52, 0x65,
0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x50,
0x61, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e,
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x50, 0x61, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x52, 0x61, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x52,
0x61, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x31, 0x18,
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52,
0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73,
0x31, 0x12, 0x2b, 0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x32, 0x18, 0x07, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x6e, 0x6b,
0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x32, 0x12, 0x2b,
0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x33, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61,
0x72, 0x64, 0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x33, 0x1a, 0x3b, 0x0a, 0x0d, 0x50,
0x61, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67,
0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -6925,7 +7122,7 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData
}
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 63)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 66)
var file_common_proto_goTypes = []interface{}{
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
@ -6985,32 +7182,35 @@ var file_common_proto_goTypes = []interface{}{
(*WelfarePhoneLotteryStatus)(nil), // 55: webapi.WelfarePhoneLotteryStatus
(*WelfareCollectConfig)(nil), // 56: webapi.WelfareCollectConfig
(*ChannelSwitchConfig)(nil), // 57: webapi.ChannelSwitchConfig
nil, // 58: webapi.Platform.BindTelRewardEntry
nil, // 59: webapi.PlayerData.RankScoreEntry
nil, // 60: webapi.ItemShop.AwardEntry
nil, // 61: webapi.VIPcfg.AwardEntry
nil, // 62: webapi.VIPcfg.Privilege7Entry
(*server.DB_GameFree)(nil), // 63: server.DB_GameFree
(*RankAward)(nil), // 58: webapi.RankAward
(*ActInviteConfig)(nil), // 59: webapi.ActInviteConfig
nil, // 60: webapi.Platform.BindTelRewardEntry
nil, // 61: webapi.PlayerData.RankScoreEntry
nil, // 62: webapi.ItemShop.AwardEntry
nil, // 63: webapi.VIPcfg.AwardEntry
nil, // 64: webapi.VIPcfg.Privilege7Entry
nil, // 65: webapi.ActInviteConfig.PayScoreEntry
(*server.DB_GameFree)(nil), // 66: server.DB_GameFree
}
var file_common_proto_depIdxs = []int32{
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
58, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
60, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
63, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
66, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
63, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
59, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
66, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
61, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
29, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
20, // 13: webapi.OnlineReport.GameCount:type_name -> webapi.OnlineGameCnt
22, // 14: webapi.CommonNoticeList.List:type_name -> webapi.CommonNotice
25, // 15: webapi.ExchangeShop.ExType:type_name -> webapi.ExchangeType
24, // 16: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
60, // 17: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
62, // 17: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
27, // 18: webapi.ItemShopList.List:type_name -> webapi.ItemShop
29, // 19: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
30, // 20: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
@ -7028,16 +7228,20 @@ var file_common_proto_depIdxs = []int32{
35, // 32: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
44, // 33: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
44, // 34: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
61, // 35: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
62, // 36: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
63, // 35: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
64, // 36: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
47, // 37: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
35, // 38: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
51, // 39: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
40, // [40:40] is the sub-list for method output_type
40, // [40:40] is the sub-list for method input_type
40, // [40:40] is the sub-list for extension type_name
40, // [40:40] is the sub-list for extension extendee
0, // [0:40] is the sub-list for field type_name
65, // 40: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
58, // 41: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
58, // 42: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
58, // 43: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
44, // [44:44] is the sub-list for method output_type
44, // [44:44] is the sub-list for method input_type
44, // [44:44] is the sub-list for extension type_name
44, // [44:44] is the sub-list for extension extendee
0, // [0:44] is the sub-list for field type_name
}
func init() { file_common_proto_init() }
@ -7742,6 +7946,30 @@ func file_common_proto_init() {
return nil
}
}
file_common_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RankAward); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ActInviteConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -7749,7 +7977,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 63,
NumMessages: 66,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -658,4 +658,22 @@ message ChannelSwitchConfig{
int32 Tp = 1; // 1. 2.
string Platform = 2; // id
repeated string OnChannelName = 3; //
}
message RankAward{
int64 Start = 1; //
int64 End = 2; //
int64 Num = 3; //
}
// etcd /game/act_invite
message ActInviteConfig {
string Platform = 1;
int64 BindScore = 2; //
int64 RechargeScore = 3; //
map<int64,int64> PayScore = 4; //
repeated int64 Rates = 5; //
repeated RankAward Awards1 = 6; //
repeated RankAward Awards2 = 7; //
repeated RankAward Awards3 = 8; //
}

View File

@ -1964,23 +1964,93 @@ func (*CSInviteInfo) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{28}
}
type RankAward struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=Start,proto3" json:"Start,omitempty"` // 开始积分
End int64 `protobuf:"varint,2,opt,name=End,proto3" json:"End,omitempty"` // 结束积分
Num int64 `protobuf:"varint,3,opt,name=Num,proto3" json:"Num,omitempty"` // 奖励
}
func (x *RankAward) Reset() {
*x = RankAward{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RankAward) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankAward) ProtoMessage() {}
func (x *RankAward) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RankAward.ProtoReflect.Descriptor instead.
func (*RankAward) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{29}
}
func (x *RankAward) GetStart() int64 {
if x != nil {
return x.Start
}
return 0
}
func (x *RankAward) GetEnd() int64 {
if x != nil {
return x.End
}
return 0
}
func (x *RankAward) GetNum() int64 {
if x != nil {
return x.Num
}
return 0
}
// PACKET_SCInviteInfo
type SCInviteInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` // 邀请人数
Code string `protobuf:"bytes,2,opt,name=Code,proto3" json:"Code,omitempty"` // 邀请码
InviteUrl string `protobuf:"bytes,3,opt,name=InviteUrl,proto3" json:"InviteUrl,omitempty"` // 邀请链接
Score int64 `protobuf:"varint,4,opt,name=Score,proto3" json:"Score,omitempty"` // 邀请积分
OtherCode string `protobuf:"bytes,5,opt,name=OtherCode,proto3" json:"OtherCode,omitempty"` // 已绑定的邀请码
Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` // 邀请人数
Code string `protobuf:"bytes,2,opt,name=Code,proto3" json:"Code,omitempty"` // 邀请码
InviteUrl string `protobuf:"bytes,3,opt,name=InviteUrl,proto3" json:"InviteUrl,omitempty"` // 邀请链接
Score int64 `protobuf:"varint,4,opt,name=Score,proto3" json:"Score,omitempty"` // 邀请积分
OtherCode string `protobuf:"bytes,5,opt,name=OtherCode,proto3" json:"OtherCode,omitempty"` // 已绑定的邀请码
BindScore int64 `protobuf:"varint,6,opt,name=BindScore,proto3" json:"BindScore,omitempty"` // 绑定积分
RechargeScore int64 `protobuf:"varint,7,opt,name=RechargeScore,proto3" json:"RechargeScore,omitempty"` // 充值积分,一个玩家最多给上级贡献一次
PayScore map[int64]int64 `protobuf:"bytes,8,rep,name=PayScore,proto3" json:"PayScore,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 充值积分;充值金额:获得积分
Rates []int64 `protobuf:"varint,9,rep,packed,name=Rates,proto3" json:"Rates,omitempty"` // 返佣比例;多级按顺序给
Awards1 []*RankAward `protobuf:"bytes,10,rep,name=Awards1,proto3" json:"Awards1,omitempty"` // 周榜奖励列表
Awards2 []*RankAward `protobuf:"bytes,11,rep,name=Awards2,proto3" json:"Awards2,omitempty"` // 周榜奖励列表
Awards3 []*RankAward `protobuf:"bytes,12,rep,name=Awards3,proto3" json:"Awards3,omitempty"` // 周榜奖励列表
}
func (x *SCInviteInfo) Reset() {
*x = SCInviteInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[29]
mi := &file_welfare_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1993,7 +2063,7 @@ func (x *SCInviteInfo) String() string {
func (*SCInviteInfo) ProtoMessage() {}
func (x *SCInviteInfo) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[29]
mi := &file_welfare_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2006,7 +2076,7 @@ func (x *SCInviteInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use SCInviteInfo.ProtoReflect.Descriptor instead.
func (*SCInviteInfo) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{29}
return file_welfare_proto_rawDescGZIP(), []int{30}
}
func (x *SCInviteInfo) GetNum() int32 {
@ -2044,6 +2114,55 @@ func (x *SCInviteInfo) GetOtherCode() string {
return ""
}
func (x *SCInviteInfo) GetBindScore() int64 {
if x != nil {
return x.BindScore
}
return 0
}
func (x *SCInviteInfo) GetRechargeScore() int64 {
if x != nil {
return x.RechargeScore
}
return 0
}
func (x *SCInviteInfo) GetPayScore() map[int64]int64 {
if x != nil {
return x.PayScore
}
return nil
}
func (x *SCInviteInfo) GetRates() []int64 {
if x != nil {
return x.Rates
}
return nil
}
func (x *SCInviteInfo) GetAwards1() []*RankAward {
if x != nil {
return x.Awards1
}
return nil
}
func (x *SCInviteInfo) GetAwards2() []*RankAward {
if x != nil {
return x.Awards2
}
return nil
}
func (x *SCInviteInfo) GetAwards3() []*RankAward {
if x != nil {
return x.Awards3
}
return nil
}
// 绑定邀请人
// PACKET_CSBindInvite
type CSBindInvite struct {
@ -2057,7 +2176,7 @@ type CSBindInvite struct {
func (x *CSBindInvite) Reset() {
*x = CSBindInvite{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[30]
mi := &file_welfare_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2070,7 +2189,7 @@ func (x *CSBindInvite) String() string {
func (*CSBindInvite) ProtoMessage() {}
func (x *CSBindInvite) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[30]
mi := &file_welfare_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2083,7 +2202,7 @@ func (x *CSBindInvite) ProtoReflect() protoreflect.Message {
// Deprecated: Use CSBindInvite.ProtoReflect.Descriptor instead.
func (*CSBindInvite) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{30}
return file_welfare_proto_rawDescGZIP(), []int{31}
}
func (x *CSBindInvite) GetCode() string {
@ -2105,7 +2224,7 @@ type SCBindInvite struct {
func (x *SCBindInvite) Reset() {
*x = SCBindInvite{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[31]
mi := &file_welfare_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2118,7 +2237,7 @@ func (x *SCBindInvite) String() string {
func (*SCBindInvite) ProtoMessage() {}
func (x *SCBindInvite) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[31]
mi := &file_welfare_proto_msgTypes[32]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2131,7 +2250,7 @@ func (x *SCBindInvite) ProtoReflect() protoreflect.Message {
// Deprecated: Use SCBindInvite.ProtoReflect.Descriptor instead.
func (*SCBindInvite) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{31}
return file_welfare_proto_rawDescGZIP(), []int{32}
}
func (x *SCBindInvite) GetOpRetCode() OpResultCode {
@ -2152,7 +2271,7 @@ type CSPigbankGetInfo struct {
func (x *CSPigbankGetInfo) Reset() {
*x = CSPigbankGetInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[32]
mi := &file_welfare_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2165,7 +2284,7 @@ func (x *CSPigbankGetInfo) String() string {
func (*CSPigbankGetInfo) ProtoMessage() {}
func (x *CSPigbankGetInfo) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[32]
mi := &file_welfare_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2178,7 +2297,7 @@ func (x *CSPigbankGetInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use CSPigbankGetInfo.ProtoReflect.Descriptor instead.
func (*CSPigbankGetInfo) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{32}
return file_welfare_proto_rawDescGZIP(), []int{33}
}
// 存钱罐信息
@ -2199,7 +2318,7 @@ type SCPigbankGetInfo struct {
func (x *SCPigbankGetInfo) Reset() {
*x = SCPigbankGetInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[33]
mi := &file_welfare_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2212,7 +2331,7 @@ func (x *SCPigbankGetInfo) String() string {
func (*SCPigbankGetInfo) ProtoMessage() {}
func (x *SCPigbankGetInfo) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[33]
mi := &file_welfare_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2225,7 +2344,7 @@ func (x *SCPigbankGetInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use SCPigbankGetInfo.ProtoReflect.Descriptor instead.
func (*SCPigbankGetInfo) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{33}
return file_welfare_proto_rawDescGZIP(), []int{34}
}
func (x *SCPigbankGetInfo) GetOpRetCode() OpResultCode {
@ -2281,7 +2400,7 @@ type CSPigbankTakeCoin struct {
func (x *CSPigbankTakeCoin) Reset() {
*x = CSPigbankTakeCoin{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[34]
mi := &file_welfare_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2294,7 +2413,7 @@ func (x *CSPigbankTakeCoin) String() string {
func (*CSPigbankTakeCoin) ProtoMessage() {}
func (x *CSPigbankTakeCoin) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[34]
mi := &file_welfare_proto_msgTypes[35]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2307,7 +2426,7 @@ func (x *CSPigbankTakeCoin) ProtoReflect() protoreflect.Message {
// Deprecated: Use CSPigbankTakeCoin.ProtoReflect.Descriptor instead.
func (*CSPigbankTakeCoin) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{34}
return file_welfare_proto_rawDescGZIP(), []int{35}
}
// 存钱罐领取金币
@ -2328,7 +2447,7 @@ type SCPigbankTakeCoin struct {
func (x *SCPigbankTakeCoin) Reset() {
*x = SCPigbankTakeCoin{}
if protoimpl.UnsafeEnabled {
mi := &file_welfare_proto_msgTypes[35]
mi := &file_welfare_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -2341,7 +2460,7 @@ func (x *SCPigbankTakeCoin) String() string {
func (*SCPigbankTakeCoin) ProtoMessage() {}
func (x *SCPigbankTakeCoin) ProtoReflect() protoreflect.Message {
mi := &file_welfare_proto_msgTypes[35]
mi := &file_welfare_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2354,7 +2473,7 @@ func (x *SCPigbankTakeCoin) ProtoReflect() protoreflect.Message {
// Deprecated: Use SCPigbankTakeCoin.ProtoReflect.Descriptor instead.
func (*SCPigbankTakeCoin) Descriptor() ([]byte, []int) {
return file_welfare_proto_rawDescGZIP(), []int{35}
return file_welfare_proto_rawDescGZIP(), []int{36}
}
func (x *SCPigbankTakeCoin) GetOpRetCode() OpResultCode {
@ -2580,135 +2699,161 @@ var file_welfare_proto_rawDesc = []byte{
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x47, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x22, 0x86, 0x01, 0x0a, 0x0c, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x4e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x6e, 0x76, 0x69, 0x74,
0x65, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x6e, 0x76, 0x69,
0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x4f,
0x74, 0x68, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x4f, 0x74, 0x68, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x43, 0x53, 0x42,
0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x43, 0x0a,
0x0c, 0x53, 0x43, 0x42, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x33, 0x0a,
0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47,
0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xe9, 0x01, 0x0a, 0x10, 0x53, 0x43, 0x50, 0x69, 0x67,
0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x09, 0x4f,
0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15,
0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x42, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x08, 0x42, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f,
0x73, 0x74, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0b, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b,
0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22,
0x0a, 0x0c, 0x44, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x6e, 0x74, 0x18, 0x06,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x44, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43,
0x6e, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54,
0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0xf0, 0x01, 0x0a, 0x11, 0x53, 0x43, 0x50, 0x69,
0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x33, 0x0a,
0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x75,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69,
0x6e, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x61,
0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x43,
0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x4d,
0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x44, 0x61, 0x79, 0x42, 0x75, 0x79,
0x4d, 0x61, 0x78, 0x43, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x44, 0x61,
0x79, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x6e, 0x74, 0x2a, 0x86, 0x02, 0x0a, 0x0c, 0x4f,
0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f,
0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a,
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c,
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x10, 0x02, 0x12, 0x14,
0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x6f, 0x4d, 0x6f,
0x72, 0x65, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72,
0x43, 0x6f, 0x69, 0x6e, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41,
0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d,
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x10, 0x06, 0x12,
0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4d, 0x79, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x78,
0x69, 0x73, 0x74, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x65, 0x73, 0x73, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4f,
0x50, 0x52, 0x43, 0x5f, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x75,
0x6c, 0x6c, 0x10, 0x0a, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x69, 0x67,
0x62, 0x61, 0x6e, 0x6b, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x10, 0x0b, 0x2a, 0xcd, 0x07, 0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49,
0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x48, 0x4f, 0x50,
0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x52, 0x45, 0x4c,
0x49, 0x45, 0x46, 0x46, 0x55, 0x4e, 0x44, 0x10, 0x94, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54,
0x52, 0x45, 0x4c, 0x49, 0x45, 0x46, 0x46, 0x55, 0x4e, 0x44, 0x10, 0x95, 0x14, 0x12, 0x20, 0x0a,
0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f,
0x47, 0x45, 0x54, 0x54, 0x55, 0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x96, 0x14, 0x12,
0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c,
0x46, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x55, 0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x97,
0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57,
0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49, 0x47, 0x4e,
0x10, 0x98, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49,
0x47, 0x4e, 0x10, 0x99, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52, 0x45, 0x49,
0x4e, 0x46, 0x4f, 0x10, 0x9a, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52, 0x45,
0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9b, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f,
0x58, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9c, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e, 0x42,
0x4f, 0x58, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9d, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x42,
0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x10, 0x9e, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x42,
0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x10, 0x9f, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53,
0x54, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa0, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49,
0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa1, 0x14, 0x12, 0x1c, 0x0a,
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f,
0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x10, 0xa2, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49,
0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x10, 0xa3, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
0x49, 0x4e, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa4, 0x14, 0x12, 0x21, 0x0a, 0x1c,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43,
0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa5, 0x14, 0x12,
0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c,
0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x10, 0xa6, 0x14, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46,
0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x10, 0xa7, 0x14, 0x12, 0x18, 0x0a,
0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x57, 0x65, 0x6c, 0x66, 0x52, 0x65,
0x6c, 0x69, 0x65, 0x66, 0x10, 0xd4, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x57, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x10, 0xd5,
0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e,
0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xd6, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x10, 0xd7, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x43, 0x53, 0x42, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0xd8, 0x16, 0x12,
0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x42, 0x69, 0x6e, 0x64,
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0xd9, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x10, 0xde, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e,
0x66, 0x6f, 0x10, 0xdf, 0x16, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69,
0x6e, 0x10, 0xe0, 0x16, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e,
0x10, 0xe1, 0x16, 0x42, 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d,
0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x22, 0x45, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x74,
0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x03, 0x45, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0xe8, 0x03, 0x0a, 0x0c, 0x53, 0x43, 0x49, 0x6e,
0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c,
0x0a, 0x09, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05,
0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f,
0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x1c, 0x0a, 0x09, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x24,
0x0a, 0x0d, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x53,
0x63, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x50, 0x61, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65,
0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65,
0x2e, 0x53, 0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x61,
0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x50, 0x61, 0x79,
0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x52, 0x61, 0x74, 0x65, 0x73, 0x18, 0x09,
0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x41,
0x77, 0x61, 0x72, 0x64, 0x73, 0x31, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77,
0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64,
0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x31, 0x12, 0x2c, 0x0a, 0x07, 0x41, 0x77, 0x61,
0x72, 0x64, 0x73, 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x65, 0x6c,
0x66, 0x61, 0x72, 0x65, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07,
0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x32, 0x12, 0x2c, 0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64,
0x73, 0x33, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61,
0x72, 0x65, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x41, 0x77,
0x61, 0x72, 0x64, 0x73, 0x33, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x53, 0x63, 0x6f, 0x72,
0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x22, 0x22, 0x0a, 0x0c, 0x43, 0x53, 0x42, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69,
0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x43, 0x0a, 0x0c, 0x53, 0x43, 0x42, 0x69, 0x6e, 0x64,
0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43,
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66,
0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x43,
0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22,
0xe9, 0x01, 0x0a, 0x10, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72,
0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09,
0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x61, 0x6e,
0x6b, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x42, 0x61, 0x6e,
0x6b, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x61, 0x6d, 0x6f,
0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78,
0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x61, 0x6e, 0x6b,
0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x44, 0x61, 0x79, 0x42, 0x75,
0x79, 0x4d, 0x61, 0x78, 0x43, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x44,
0x61, 0x79, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x6e, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x43,
0x53, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e,
0x22, 0xf0, 0x01, 0x0a, 0x11, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x54, 0x61,
0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43,
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x65, 0x6c, 0x66,
0x61, 0x72, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x54,
0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a,
0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x43,
0x6f, 0x73, 0x74, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x20, 0x0a,
0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0b, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x12,
0x22, 0x0a, 0x0c, 0x44, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x6e, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x44, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78,
0x43, 0x6e, 0x74, 0x2a, 0x86, 0x02, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63,
0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f,
0x43, 0x6f, 0x69, 0x6e, 0x54, 0x6f, 0x6f, 0x4d, 0x6f, 0x72, 0x65, 0x10, 0x03, 0x12, 0x10, 0x0a,
0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x04, 0x12,
0x14, 0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x42,
0x69, 0x6e, 0x64, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x42, 0x69,
0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43,
0x5f, 0x4d, 0x79, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x4f,
0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x08, 0x12, 0x14,
0x0a, 0x10, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x65,
0x73, 0x73, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x69, 0x67,
0x62, 0x61, 0x6e, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x0a, 0x12, 0x1d, 0x0a,
0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x4f, 0x76, 0x65,
0x72, 0x54, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x10, 0x0b, 0x2a, 0xcd, 0x07, 0x0a,
0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x48, 0x4f, 0x50, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45,
0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x52, 0x45, 0x4c, 0x49, 0x45, 0x46, 0x46, 0x55, 0x4e, 0x44,
0x10, 0x94, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x52, 0x45, 0x4c, 0x49, 0x45, 0x46, 0x46,
0x55, 0x4e, 0x44, 0x10, 0x95, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x55, 0x52, 0x4e,
0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x96, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x55,
0x52, 0x4e, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x97, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54,
0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x98, 0x14, 0x12, 0x20, 0x0a, 0x1b,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47,
0x45, 0x54, 0x41, 0x44, 0x44, 0x55, 0x50, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x99, 0x14, 0x12, 0x1f,
0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46,
0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52, 0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9a, 0x14, 0x12,
0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c,
0x46, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x41, 0x52, 0x45, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9b, 0x14,
0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45,
0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9c,
0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57,
0x45, 0x4c, 0x46, 0x5f, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x49, 0x4e, 0x46, 0x4f, 0x10,
0x9d, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x10,
0x9e, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f,
0x57, 0x45, 0x4c, 0x46, 0x5f, 0x47, 0x45, 0x54, 0x42, 0x4c, 0x49, 0x4e, 0x42, 0x4f, 0x58, 0x10,
0x9f, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x46,
0x4f, 0x10, 0xa0, 0x14, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x49,
0x4e, 0x46, 0x4f, 0x10, 0xa1, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41,
0x59, 0x10, 0xa2, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x50, 0x41, 0x59, 0x10,
0xa3, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f,
0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41, 0x59, 0x49, 0x4e,
0x46, 0x4f, 0x10, 0xa4, 0x14, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x50, 0x41,
0x59, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xa5, 0x14, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49,
0x4e, 0x50, 0x41, 0x59, 0x10, 0xa6, 0x14, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45,
0x54, 0x5f, 0x53, 0x43, 0x5f, 0x57, 0x45, 0x4c, 0x46, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e,
0x50, 0x41, 0x59, 0x10, 0xa7, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x53, 0x57, 0x65, 0x6c, 0x66, 0x52, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x10, 0xd4, 0x16,
0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x57, 0x65, 0x6c,
0x66, 0x52, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x10, 0xd5, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66,
0x6f, 0x10, 0xd6, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xd7, 0x16, 0x12, 0x18,
0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x42, 0x69, 0x6e, 0x64, 0x49,
0x6e, 0x76, 0x69, 0x74, 0x65, 0x10, 0xd8, 0x16, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x42, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x10,
0xd9, 0x16, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50,
0x69, 0x67, 0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xde, 0x16,
0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x69, 0x67,
0x62, 0x61, 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xdf, 0x16, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x69, 0x67, 0x62, 0x61,
0x6e, 0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe0, 0x16, 0x12, 0x1d, 0x0a,
0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x69, 0x67, 0x62, 0x61, 0x6e,
0x6b, 0x54, 0x61, 0x6b, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0xe1, 0x16, 0x42, 0x27, 0x5a, 0x25,
0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65,
0x6c, 0x66, 0x61, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -2724,7 +2869,7 @@ func file_welfare_proto_rawDescGZIP() []byte {
}
var file_welfare_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_welfare_proto_msgTypes = make([]protoimpl.MessageInfo, 36)
var file_welfare_proto_msgTypes = make([]protoimpl.MessageInfo, 38)
var file_welfare_proto_goTypes = []interface{}{
(OpResultCode)(0), // 0: welfare.OpResultCode
(SPacketID)(0), // 1: welfare.SPacketID
@ -2757,13 +2902,15 @@ var file_welfare_proto_goTypes = []interface{}{
(*CSWelfareRelief)(nil), // 28: welfare.CSWelfareRelief
(*SCWelfareRelief)(nil), // 29: welfare.SCWelfareRelief
(*CSInviteInfo)(nil), // 30: welfare.CSInviteInfo
(*SCInviteInfo)(nil), // 31: welfare.SCInviteInfo
(*CSBindInvite)(nil), // 32: welfare.CSBindInvite
(*SCBindInvite)(nil), // 33: welfare.SCBindInvite
(*CSPigbankGetInfo)(nil), // 34: welfare.CSPigbankGetInfo
(*SCPigbankGetInfo)(nil), // 35: welfare.SCPigbankGetInfo
(*CSPigbankTakeCoin)(nil), // 36: welfare.CSPigbankTakeCoin
(*SCPigbankTakeCoin)(nil), // 37: welfare.SCPigbankTakeCoin
(*RankAward)(nil), // 31: welfare.RankAward
(*SCInviteInfo)(nil), // 32: welfare.SCInviteInfo
(*CSBindInvite)(nil), // 33: welfare.CSBindInvite
(*SCBindInvite)(nil), // 34: welfare.SCBindInvite
(*CSPigbankGetInfo)(nil), // 35: welfare.CSPigbankGetInfo
(*SCPigbankGetInfo)(nil), // 36: welfare.SCPigbankGetInfo
(*CSPigbankTakeCoin)(nil), // 37: welfare.CSPigbankTakeCoin
(*SCPigbankTakeCoin)(nil), // 38: welfare.SCPigbankTakeCoin
nil, // 39: welfare.SCInviteInfo.PayScoreEntry
}
var file_welfare_proto_depIdxs = []int32{
0, // 0: welfare.SCGetReliefFund.OpRetCode:type_name -> welfare.OpResultCode
@ -2787,14 +2934,18 @@ var file_welfare_proto_depIdxs = []int32{
0, // 18: welfare.SCWelfareContinuousPayData.OpRetCode:type_name -> welfare.OpResultCode
19, // 19: welfare.SCWelfareContinuousPayData.List:type_name -> welfare.WelfareSpree
0, // 20: welfare.SCWelfareContinuousPay.OpRetCode:type_name -> welfare.OpResultCode
0, // 21: welfare.SCBindInvite.OpRetCode:type_name -> welfare.OpResultCode
0, // 22: welfare.SCPigbankGetInfo.OpRetCode:type_name -> welfare.OpResultCode
0, // 23: welfare.SCPigbankTakeCoin.OpRetCode:type_name -> welfare.OpResultCode
24, // [24:24] is the sub-list for method output_type
24, // [24:24] is the sub-list for method input_type
24, // [24:24] is the sub-list for extension type_name
24, // [24:24] is the sub-list for extension extendee
0, // [0:24] is the sub-list for field type_name
39, // 21: welfare.SCInviteInfo.PayScore:type_name -> welfare.SCInviteInfo.PayScoreEntry
31, // 22: welfare.SCInviteInfo.Awards1:type_name -> welfare.RankAward
31, // 23: welfare.SCInviteInfo.Awards2:type_name -> welfare.RankAward
31, // 24: welfare.SCInviteInfo.Awards3:type_name -> welfare.RankAward
0, // 25: welfare.SCBindInvite.OpRetCode:type_name -> welfare.OpResultCode
0, // 26: welfare.SCPigbankGetInfo.OpRetCode:type_name -> welfare.OpResultCode
0, // 27: welfare.SCPigbankTakeCoin.OpRetCode:type_name -> welfare.OpResultCode
28, // [28:28] is the sub-list for method output_type
28, // [28:28] is the sub-list for method input_type
28, // [28:28] is the sub-list for extension type_name
28, // [28:28] is the sub-list for extension extendee
0, // [0:28] is the sub-list for field type_name
}
func init() { file_welfare_proto_init() }
@ -3152,7 +3303,7 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCInviteInfo); i {
switch v := v.(*RankAward); i {
case 0:
return &v.state
case 1:
@ -3164,7 +3315,7 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSBindInvite); i {
switch v := v.(*SCInviteInfo); i {
case 0:
return &v.state
case 1:
@ -3176,7 +3327,7 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCBindInvite); i {
switch v := v.(*CSBindInvite); i {
case 0:
return &v.state
case 1:
@ -3188,7 +3339,7 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSPigbankGetInfo); i {
switch v := v.(*SCBindInvite); i {
case 0:
return &v.state
case 1:
@ -3200,7 +3351,7 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCPigbankGetInfo); i {
switch v := v.(*CSPigbankGetInfo); i {
case 0:
return &v.state
case 1:
@ -3212,7 +3363,7 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSPigbankTakeCoin); i {
switch v := v.(*SCPigbankGetInfo); i {
case 0:
return &v.state
case 1:
@ -3224,6 +3375,18 @@ func file_welfare_proto_init() {
}
}
file_welfare_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSPigbankTakeCoin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_welfare_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCPigbankTakeCoin); i {
case 0:
return &v.state
@ -3242,7 +3405,7 @@ func file_welfare_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_welfare_proto_rawDesc,
NumEnums: 2,
NumMessages: 36,
NumMessages: 38,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -246,6 +246,13 @@ message SCWelfareRelief{
//
// PACKET_CSInviteInfo
message CSInviteInfo{}
message RankAward{
int64 Start = 1; //
int64 End = 2; //
int64 Num = 3; //
}
// PACKET_SCInviteInfo
message SCInviteInfo{
int32 Num = 1; //
@ -253,6 +260,13 @@ message SCInviteInfo{
string InviteUrl = 3; //
int64 Score = 4; //
string OtherCode = 5; //
int64 BindScore = 6; //
int64 RechargeScore = 7; //
map<int64,int64> PayScore = 8; //
repeated int64 Rates = 9; //
repeated RankAward Awards1 = 10; //
repeated RankAward Awards2 = 11; //
repeated RankAward Awards3 = 12; //
}
//

2
public

@ -1 +1 @@
Subproject commit 363a22034898c87b42588d088a7838134d84dcb6
Subproject commit 63d1713eb8595d4ad6334f88febbd0ca46bb67a1

View File

@ -2094,15 +2094,16 @@ func CSPlayerData(s *netlib.Session, packetid int, data interface{}, sid int64)
}
proto.SetDefaults(scPlayerData)
common.SendToGate(sid, int(player_proto.PlayerPacketID_PACKET_SC_PLAYERDATA), scPlayerData, s)
logger.Logger.Tracef("SC_PLAYERDATA %v", scPlayerData)
}
sid := PlayerMgrSington.EndPlayerLoading(cspl.GetAccId())
if pd == nil {
send(player_proto.OpResultCode_OPRC_Login_CreateFailed)
return
}
sid := PlayerMgrSington.EndPlayerLoading(cspl.GetAccId())
var promoterID string
var promoterCfg *PromoterConfig
f := func() {

View File

@ -1,8 +1,9 @@
package main
import (
"encoding/base64"
"errors"
"fmt"
"time"
"mongo.games.com/goserver/core/basic"
"mongo.games.com/goserver/core/logger"
@ -307,7 +308,7 @@ func CSInviteInfo(s *netlib.Session, packetid int, data interface{}, sid int64)
}
link := model.GameParamData.InviteUrl
f := func() string {
return fmt.Sprintf("%s?user=%s", link, base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s|%d", p.Platform, p.SnId))))
return fmt.Sprintf("%s?user=%s", link, p.ICode)
}
var res []byte
@ -330,12 +331,42 @@ func CSInviteInfo(s *netlib.Session, packetid int, data interface{}, sid int64)
}
ret := &welfare.SCInviteInfo{
Num: p.InviteNum,
Code: p.InviteCode,
Num: int32(p.INum),
Code: p.ICode,
InviteUrl: f(),
Score: p.InviteScore,
OtherCode: p.OtherCode,
Score: p.IScore,
OtherCode: p.PCode,
}
cfg := PlatformMgrSingleton.GetConfig(p.Platform).ActInviteConfig
if cfg != nil {
ret.BindScore = cfg.GetBindScore()
ret.RechargeScore = cfg.GetRechargeScore()
ret.PayScore = cfg.GetPayScore()
for _, v := range cfg.GetAwards1() {
ret.Awards1 = append(ret.Awards1, &welfare.RankAward{
Start: v.GetStart(),
End: v.GetEnd(),
Num: v.GetNum(),
})
}
for _, v := range cfg.GetAwards2() {
ret.Awards2 = append(ret.Awards2, &welfare.RankAward{
Start: v.GetStart(),
End: v.GetEnd(),
Num: v.GetNum(),
})
}
for _, v := range cfg.GetAwards3() {
ret.Awards3 = append(ret.Awards3, &welfare.RankAward{
Start: v.GetStart(),
End: v.GetEnd(),
Num: v.GetNum(),
})
}
ret.Rates = cfg.GetRates()
}
p.SendToClient(int(welfare.SPacketID_PACKET_SCInviteInfo), ret)
logger.Logger.Tracef("SCInviteInfo %v", ret)
})).Start()
@ -358,25 +389,20 @@ func CSBindInvite(s *netlib.Session, packetid int, data interface{}, sid int64)
var inviteSnId int32
var err error
now := time.Now()
cfg := PlatformMgrSingleton.GetConfig(p.Platform).ActInviteConfig
send := func() {
p.SendToClient(int(welfare.SPacketID_PACKET_SCBindInvite), ret)
logger.Logger.Tracef("SCBindInvite %v", ret)
if ret.OpRetCode == welfare.OpResultCode_OPRC_Sucess {
// 更新绑定关系
LogChannelSingleton.WriteLog(&model.BindInvite{
Platform: p.Platform,
SnId: p.SnId,
InviteSnId: inviteSnId,
})
// 玩家自己的绑定任务
TaskSubjectSingleton.Touch(common.TaskTypeBindInviter, &TaskData{SnId: p.SnId, Num: 1})
p.InviteTask(common.InviteScoreTypeLogin, 0, 1)
}
}
if p.InviteSnId != 0 {
if p.PSnId != 0 {
ret.OpRetCode = welfare.OpResultCode_OPRC_AlreadyBind
send()
return nil
@ -393,43 +419,43 @@ func CSBindInvite(s *netlib.Session, packetid int, data interface{}, sid int64)
return
}
if inviteSnId == p.SnId {
ret.OpRetCode = welfare.OpResultCode_OPRC_BindSelf
send()
return
}
pp := PlayerMgrSington.GetPlayerBySnId(inviteSnId)
if pp != nil {
if pp.InviteSnId == p.SnId {
ret.OpRetCode = welfare.OpResultCode_OPRC_MyInvite
send()
return
}
p.InviteSnId = pp.SnId
p.OtherCode = pp.InviteCode
ret.OpRetCode = welfare.OpResultCode_OPRC_Sucess
send()
return
}
inviteSnId2 := int32(0)
// 3级父级不能是自己
var err error
tmpSnId := inviteSnId
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
inviteSnId2, err = model.GetPlayerInviteSnid(p.Platform, inviteSnId)
// todo 优化查找顶级代理
for i := 0; i < 10000; i++ {
if tmpSnId == p.SnId {
ret.OpRetCode = welfare.OpResultCode_OPRC_BindSelf
err = errors.New("bind error")
return nil
}
tmpSnId, err = model.GetPlayerInviteSnid(p.Platform, tmpSnId)
if err != nil {
ret.OpRetCode = welfare.OpResultCode_OPRC_Error
return nil
}
if tmpSnId == 0 {
break
}
}
SaveInviteScore(&model.InviteScore{
Platform: p.Platform,
SnId: p.SnId,
InviteSnId: inviteSnId,
Tp: common.InviteScoreTypeBind,
Score: cfg.GetBindScore(),
Ts: now.Unix(),
Money: 0,
})
return nil
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
if err != nil {
send()
return
}
if inviteSnId2 == p.SnId {
ret.OpRetCode = welfare.OpResultCode_OPRC_MyInvite
send()
return
}
p.InviteSnId = inviteSnId
p.OtherCode = msg.GetCode()
p.PSnId = inviteSnId
p.PCode = msg.GetCode()
ret.OpRetCode = welfare.OpResultCode_OPRC_Sucess
send()
})).Start()

View File

@ -522,11 +522,11 @@ func (this *BagMgr) Shutdown() {
//========================implement IPlayerLoad ==============================
func (this *BagMgr) Load(platform string, snid int32, player any) *internal.PlayerLoadReplay {
data := model.GetBagInfo(snid, platform)
data, err := model.GetBagInfo(snid, platform)
return &internal.PlayerLoadReplay{
Platform: platform,
Snid: snid,
Err: nil,
Err: err,
Data: data,
}
}

View File

@ -66,6 +66,8 @@ func init() {
etcd.Register(etcd.ETCDKEY_CHESSRANK_CFG, webapi.ChessRankcfgData{}, platformConfigEvent)
// 手机积分
etcd.Register(etcd.ETCDKEY_ACT_PHONELOTTERY, webapi.WelfarePhoneLotteryStatus{}, platformConfigEvent)
// 邀请活动
etcd.Register(etcd.ETCDKEY_ACT_Invite, webapi.ActInviteConfig{}, platformConfigEvent)
}
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
@ -195,7 +197,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
ChessRankMgrSington.UpdateChessRankConfig(config)
case *webapi.WelfarePhoneLotteryStatus:
WelfareMgrSington.UpdatePhoneLotteryStatus(config)
case *webapi.ActInviteConfig:
PlatformMgrSingleton.GetConfig(config.Platform).ActInviteConfig = config
default:
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
}

View File

@ -1,124 +1,34 @@
package main
import (
"fmt"
"mongo.games.com/goserver/core/basic"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/task"
"time"
"mongo.games.com/game/common"
"mongo.games.com/game/model"
"mongo.games.com/game/worldsrv/internal"
)
// SaveInviteScore 保存玩家操作
// 绑定,充值成功,充值;及产生的积分,充值金额
func SaveInviteScore(data *model.InviteScore) {
if data == nil {
return
}
var err error
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
err = model.SaveInviteScore(data)
if err != nil {
logger.Logger.Errorf("SaveInviteScore error:%v", err)
return err
}
// 后台统计积分记录
data.Ts /= 1000000000 // 后台需要秒
LogChannelSingleton.WriteLog(data)
logger.Logger.Tracef("==> php InviteScore %+v", *data)
return nil
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
p := PlayerMgrSington.GetPlayerBySnId(data.InviteSnId)
if err == nil && p != nil {
if data.Score != 0 {
if data.Score < 0 {
if -data.Score > p.InviteScore {
data.Score = -p.InviteScore
}
}
p.InviteScore += data.Score
p.dirty = true
// 更新邀请任务进度
if data.Score > 0 {
TaskSubjectSingleton.Touch(common.TaskTypeInviteScore, &TaskData{
SnId: p.SnId,
Num: data.Score,
})
}
}
if data.Money > 0 {
TaskSubjectSingleton.Touch(common.TaskTypeInviteRecharge, &TaskData{
SnId: p.SnId,
Num: data.Money,
})
}
}
})).StartByFixExecutor(fmt.Sprintf("invite_score_%v", data.InviteSnId))
cfg := PlatformMgrSingleton.GetConfig(data.Platform).ActInviteConfig
data.Rate = cfg.GetRates()
LogChannelSingleton.WriteLog(&model.EvtInviteMsg{
InviteScore: *data,
RechargeScore: cfg.GetRechargeScore(),
})
}
func GetInviteScore(platform string, snid int32) {
var n, z, money int64
var err error
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
n, z, money, err = model.GetInviteScore(platform, snid)
if err != nil {
logger.Logger.Errorf("GetInviteScore error:%v", err)
return err
}
return nil
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
p := PlayerMgrSington.GetPlayerBySnId(snid)
if err == nil && p != nil {
p.InviteScore = n
p.dirty = true
// 更新邀请任务进度
p.ResetTaskN(common.TaskTypeInviteScore)
TaskSubjectSingleton.Touch(common.TaskTypeInviteScore, &TaskData{
SnId: p.SnId,
Num: z,
})
p.ResetTaskN(common.TaskTypeInviteRecharge)
TaskSubjectSingleton.Touch(common.TaskTypeInviteRecharge, &TaskData{
SnId: p.SnId,
Num: money,
})
}
})).StartByFixExecutor(fmt.Sprintf("invite_score_%v", snid))
}
type InviteCode struct {
internal.BasePlayerLoader
}
func (i *InviteCode) LoadAfter(platform string, snid int32) *internal.PlayerLoadReplay {
n, err := model.GetInviteNum(platform, snid)
return &internal.PlayerLoadReplay{
Platform: platform,
Snid: snid,
Err: err,
Data: n,
}
}
func (i *InviteCode) CallbackAfter(ret *internal.PlayerLoadReplay) {
if ret == nil {
return
}
p := PlayerMgrSington.GetPlayerBySnId(ret.Snid)
if p == nil {
return
}
p.InviteNum = ret.Data.(int32)
p.ResetTaskN(common.TaskTypeInviteNum)
TaskSubjectSingleton.Touch(common.TaskTypeInviteNum, &TaskData{SnId: p.SnId, Num: int64(p.InviteNum)})
GetInviteScore(ret.Platform, ret.Snid)
}
func init() {
internal.RegisterPlayerLoad(new(InviteCode))
// CheckNewWeek 每周重置积分
func CheckNewWeek(platform string, snid int32) {
LogChannelSingleton.WriteLog(&model.EvtInviteMsg{
InviteScore: model.InviteScore{
Platform: platform,
SnId: snid,
Tp: common.InviteScoreCheckWeek,
Ts: time.Now().Unix(),
},
})
}

View File

@ -58,7 +58,6 @@ func init() {
LogChannelSingleton.RegisterLogCName(model.MQRankPlayerCoin, &model.RankPlayerCoin{})
LogChannelSingleton.RegisterLogCName(mq.BackBankrupt, &model.BankruptLog{})
LogChannelSingleton.RegisterLogCName(mq.BackReliefund, &model.ReliefFundLog{})
LogChannelSingleton.RegisterLogCName(model.EvtBindInvite, &model.BindInvite{})
LogChannelSingleton.RegisterLogCName(mq.BackInviteScore, &model.InviteScore{})
LogChannelSingleton.RegisterLogCName(model.EvtInvite, &model.EvtInviteMsg{})
LogChannelSingleton.RegisterLogCName(model.MQRankPlayerLevel, &model.PlayerLevelInfo{})
}

View File

@ -7,6 +7,7 @@ import (
"mongo.games.com/goserver/core/basic"
"mongo.games.com/goserver/core/broker"
"mongo.games.com/goserver/core/broker/rabbitmq"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common"
"mongo.games.com/game/model"
@ -41,31 +42,49 @@ func init() {
return nil
}, broker.Queue(model.TopicProbeCoinLogAck), rabbitmq.DurableQueue())
// 绑定数量同步
mq.RegisterSubscriber(model.AckBindNum, func(e broker.Event) error {
// 邀请数据同步
mq.RegisterSubscriber(model.EvtInviteAck, func(e broker.Event) error {
msg := e.Message()
if msg != nil {
defer func() {
e.Ack()
}()
var log model.BindNum
var log model.EvtInviteAckMsg
err := json.Unmarshal(msg.Body, &log)
if err != nil {
return err
}
logger.Logger.Tracef("EvtInviteAckMsg: %+v", log)
//通知主线程执行后续操作
core.CoreObject().SendCommand(basic.CommandWrapper(func(o *basic.Object) error {
player := PlayerMgrSington.GetPlayerBySnId(log.SnId)
player := PlayerMgrSington.GetPlayerBySnId(log.Snid)
if player != nil {
player.InviteNum = log.Num
// 邀请数量
player.INum = log.Num
player.ResetTaskN(common.TaskTypeInviteNum)
TaskSubjectSingleton.Touch(common.TaskTypeInviteNum, &TaskData{SnId: player.SnId, Num: int64(player.InviteNum)})
TaskSubjectSingleton.Touch(common.TaskTypeInviteNum, &TaskData{SnId: player.SnId, Num: player.INum})
// 邀请积分
player.IScore = log.Score
player.ResetTaskN(common.TaskTypeInviteScore)
TaskSubjectSingleton.Touch(common.TaskTypeInviteScore, &TaskData{
SnId: player.SnId,
Num: log.Score,
})
// 充值金额
player.IMoney = log.Money
player.ResetTaskN(common.TaskTypeInviteRecharge)
TaskSubjectSingleton.Touch(common.TaskTypeInviteRecharge, &TaskData{
SnId: player.SnId,
Num: log.Money,
})
}
return nil
}), true)
}
return nil
}, broker.Queue(model.AckBindNum), rabbitmq.DurableQueue())
}, broker.Queue(model.EvtInviteAck), rabbitmq.DurableQueue())
}

View File

@ -146,7 +146,6 @@ type Player struct {
// 最后玩的游戏id
LastGameId int
GameID []int32 // 最近三天玩的游戏
InviteNum int32 // 邀请人数
ApplyList []int32 //玩家申请好友记录
}
@ -2222,8 +2221,6 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeEveryDay) {
this.WelfData.Task[v.GetId()] = &model.TaskData{}
}
this.WelfData.Task[common.TaskIDInvitePlayGame] = &model.TaskData{}
this.WelfData.Task[common.TaskIDInviteFirstLogin] = &model.TaskData{}
}
}
//周卡数据更新
@ -2312,6 +2309,8 @@ func (this *Player) OnWeekTimer() {
}
}
// 重置周任务
// 重置邀请积分
CheckNewWeek(this.Platform, this.SnId)
}
func (this *Player) GetName() string {
@ -2452,10 +2451,10 @@ func (this *Player) SendDiffData() {
pack.UpdateField += UpdateField_PhoneScore
}
// 邀请积分
if this.diffData.InviteScore != this.InviteScore {
if this.diffData.InviteScore != this.IScore {
dirty = true
pack.InviteScore = this.InviteScore
this.diffData.InviteScore = this.InviteScore
pack.InviteScore = this.IScore
this.diffData.InviteScore = this.IScore
pack.UpdateField += UpdateField_InviteScore
}
//总充值金额
@ -4372,97 +4371,38 @@ func (this *Player) PhoneLotteryTask(taskId int32, num int64) {
}
func (this *Player) InviteTask(scoreType int32, gameId int32, n int64) {
if this.InviteSnId == 0 {
if this.PSnId == 0 {
return
}
if this.WelfData == nil {
this.WelfData = model.NewWelfareData()
}
if this.WelfData.Task == nil {
this.WelfData.Task = make(map[int32]*model.TaskData)
}
cfg := PlatformMgrSingleton.GetConfig(this.Platform).ActInviteConfig
switch scoreType {
case common.InviteScoreTypeBind:
SaveInviteScore(&model.InviteScore{
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.InviteSnId,
Tp: scoreType,
Score: 5000,
Ts: time.Now().UnixNano(),
})
case common.InviteScoreTypeLogin:
if this.WelfData.Task[common.TaskIDInviteFirstLogin] == nil {
this.WelfData.Task[common.TaskIDInviteFirstLogin] = &model.TaskData{} // 初始化任务数据
}
if this.WelfData.Task[common.TaskIDInviteFirstLogin].Ts == 0 {
this.WelfData.Task[common.TaskIDInviteFirstLogin].Ts = time.Now().Unix()
case common.InviteScoreTypePay:
score, ok := cfg.GetPayScore()[n]
if ok {
SaveInviteScore(&model.InviteScore{
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.InviteSnId,
InviteSnId: this.PSnId,
Tp: scoreType,
Score: 1000,
Ts: time.Now().UnixNano(),
Score: score,
Ts: time.Now().Unix(),
Money: n,
})
}
case common.InviteScoreTypePlayTimes:
if this.WelfData.Task[common.TaskIDInvitePlayGame] == nil {
this.WelfData.Task[common.TaskIDInvitePlayGame] = &model.TaskData{} // 初始化任务数据
}
if this.WelfData.Task[common.TaskIDInvitePlayGame].Ts == 0 {
this.WelfData.Task[common.TaskIDInvitePlayGame].Ts = time.Now().Unix()
} else {
SaveInviteScore(&model.InviteScore{
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.InviteSnId,
Tp: scoreType,
Score: 5000,
Ts: time.Now().UnixNano(),
InviteSnId: this.PSnId,
Tp: common.InviteScoreTypeRecharge,
Score: cfg.GetRechargeScore(),
Ts: time.Now().Unix(),
Money: n,
})
}
case common.InviteScoreTypeRecharge:
if this.WelfData.Task[common.TaskIDInviteRecharge] == nil {
this.WelfData.Task[common.TaskIDInviteRecharge] = &model.TaskData{} // 初始化任务数据
}
this.WelfData.Task[common.TaskIDInviteRecharge].N += n
a := this.WelfData.Task[common.TaskIDInviteRecharge].N / 100
this.WelfData.Task[common.TaskIDInviteRecharge].N %= 100
SaveInviteScore(&model.InviteScore{
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.InviteSnId,
Tp: scoreType,
Score: a * common.InviteScoreRecharge,
Ts: time.Now().UnixNano(),
Money: n,
})
case common.InviteScoreTypeGameTimes:
score := 0
switch {
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifTienlen):
score = 500
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifThirteen):
score = 300
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifRocket):
score = 30
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifChess):
score = 100
}
SaveInviteScore(&model.InviteScore{
Platform: this.Platform,
SnId: this.SnId,
InviteSnId: this.InviteSnId,
Tp: scoreType,
Score: int64(score),
Ts: time.Now().UnixNano(),
})
}
}

View File

@ -96,21 +96,18 @@ func (t *TaskHandle) TaskUpdate(id int, data any) {
case common.TaskTypeWinTimes: // 赢游戏次数
case common.TaskTypePlayTimes: // 玩游戏次数
p.InviteTask(common.InviteScoreTypePlayTimes, int32(info.GameID), num)
p.InviteTask(common.InviteScoreTypeGameTimes, int32(info.GameID), num)
case common.TaskTypeRankMatchTimes: // 排位赛次数
case common.TaskTypePay: // 玩家充值
p.PhoneLotteryTask(common.TaskTypePay, num)
p.InviteTask(common.InviteScoreTypeRecharge, int32(info.GameID), num)
p.InviteTask(common.InviteScoreTypePay, int32(info.GameID), num)
case common.TaskTypeWinOrLose: // 游戏输赢金币数量
p.PhoneLotteryTask(common.TaskTypeWinOrLose, num)
case common.TaskTypeTienlenCount: //tienlen游戏场次
p.PhoneLotteryTask(common.TaskTypeTienlenCount, 1)
case common.TaskTypeBindInviter: // 绑定邀请人数量
p.InviteTask(common.InviteScoreTypeBind, 0, num)
case common.TaskTypeWinCoin: // 赢取金币数量
@ -123,7 +120,6 @@ func (t *TaskHandle) TaskUpdate(id int, data any) {
case common.TaskTypeFirstLogin:
//抽奖次数增加
p.PhoneLotteryTask(common.TaskTypeFirstLogin, 0)
p.InviteTask(common.InviteScoreTypeLogin, int32(info.GameID), num)
p.CollectTask(common.TaskTypeFirstLogin, num)
case common.TaskTypeInviteNum:

View File

@ -2468,7 +2468,7 @@ func init() {
if len(ret.List) > 0 {
playerRankScore = ret.List[0]
}
playerBagInfo = model.GetBagInfo(id, platform)
playerBagInfo, _ = model.GetBagInfo(id, platform)
return data
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
playerData, ok := data.(*model.PlayerData)
@ -2559,7 +2559,7 @@ func init() {
for _, v := range ret.List {
playerRankScore[v.SnId] = v
//todo 优化
items := model.GetBagInfo(v.SnId, msg.GetPlatform())
items, _ := model.GetBagInfo(v.SnId, msg.GetPlatform())
playerItems[v.SnId] = items
}

Binary file not shown.

Binary file not shown.

Binary file not shown.