|
@@ -33,22 +33,25 @@ local function l_add_active_user(uid)
|
33
|
33
|
end
|
34
|
34
|
|
35
|
35
|
-- 服务端事件埋点
|
36
|
|
-function root.logEvent(uid, version, channel, eventId, extraParams)
|
|
36
|
+function root.logEvent(uid, bandShareCode, version, channel, eventId, extraParams)
|
37
|
37
|
local now = timeUtil.currentTime()
|
38
|
38
|
local date = timeUtil.toDate(now)
|
39
|
39
|
local dateStr = timeUtil.toString(now)
|
40
|
|
- local data = {
|
41
|
|
- date,
|
42
|
|
- dateStr,
|
43
|
|
- uid or "",
|
44
|
|
- version or "",
|
45
|
|
- channel or "",
|
46
|
|
- eventId or "",
|
47
|
|
- extraParams or ""
|
48
|
|
- }
|
49
|
|
- local dataStr = root.formatData(data)
|
50
|
40
|
|
51
|
|
- writeServerLog("event", date, dataStr)
|
|
41
|
+ local cnt =
|
|
42
|
+ string.format(
|
|
43
|
+ "%s;%s;%s;%s;%s;%s;%s;%s",
|
|
44
|
+ tostring(date),
|
|
45
|
+ tostring(dateStr),
|
|
46
|
+ tostring(uid or ""),
|
|
47
|
+ tostring(bandShareCode or ""),
|
|
48
|
+ tostring(channel or 0),
|
|
49
|
+ tostring(version or ""),
|
|
50
|
+ tostring(eventId or ""),
|
|
51
|
+ tostring(extraParams or "")
|
|
52
|
+ )
|
|
53
|
+
|
|
54
|
+ writeServerLog("event", date, cnt)
|
52
|
55
|
end
|
53
|
56
|
|
54
|
57
|
-- 服务端资源埋点
|
|
@@ -75,21 +78,21 @@ function root.logResource(uid, eventId, itemId, resChgs, resResult, channel, ban
|
75
|
78
|
end
|
76
|
79
|
|
77
|
80
|
-- 服务端注册埋点
|
78
|
|
-function root.logRegister(uid, channel, version, machineType, uuid, udid, ip, userType)
|
|
81
|
+function root.logRegister(uid, bandShareCode, channel, version, machineType, uuid, udid, ip)
|
79
|
82
|
local now = timeUtil.currentTime()
|
80
|
83
|
local date = timeUtil.toDate(now)
|
81
|
84
|
local dateStr = timeUtil.toString(now)
|
82
|
85
|
local data = {
|
83
|
86
|
date,
|
84
|
|
- uid or "",
|
85
|
87
|
dateStr,
|
|
88
|
+ uid or "",
|
|
89
|
+ bandShareCode or "",
|
86
|
90
|
channel or "",
|
87
|
91
|
version or "",
|
88
|
92
|
machineType or "",
|
89
|
93
|
uuid or "",
|
90
|
94
|
udid or "",
|
91
|
|
- ip or "",
|
92
|
|
- userType or ""
|
|
95
|
+ ip or ""
|
93
|
96
|
}
|
94
|
97
|
local dataStr = root.formatData(data)
|
95
|
98
|
-- 添加到每日活跃信息中
|
|
@@ -99,23 +102,23 @@ function root.logRegister(uid, channel, version, machineType, uuid, udid, ip, us
|
99
|
102
|
end
|
100
|
103
|
|
101
|
104
|
-- 服务端登录埋点
|
102
|
|
-function root.logLogin(uid, channel, version, machineType, operator, network, uuid, udid, ip, userType)
|
|
105
|
+function root.logLogin(uid, bandShareCode, channel, version, machineType, operator, network, uuid, udid, ip)
|
103
|
106
|
local now = timeUtil.currentTime()
|
104
|
107
|
local date = timeUtil.toDate(now)
|
105
|
108
|
local dateStr = timeUtil.toString(now)
|
106
|
109
|
local data = {
|
107
|
110
|
date,
|
|
111
|
+ dateStr,
|
108
|
112
|
uid or 0,
|
|
113
|
+ bandShareCode or "",
|
109
|
114
|
channel or "",
|
110
|
115
|
version or "",
|
111
|
|
- dateStr,
|
112
|
116
|
machineType or "",
|
113
|
117
|
operator or "",
|
114
|
118
|
network or "",
|
115
|
119
|
uuid or "",
|
116
|
120
|
udid or "",
|
117
|
|
- ip or "",
|
118
|
|
- userType or ""
|
|
121
|
+ ip or ""
|
119
|
122
|
}
|
120
|
123
|
local dataStr = root.formatData(data)
|
121
|
124
|
-- 添加到每日活跃信息中
|
|
@@ -125,7 +128,7 @@ function root.logLogin(uid, channel, version, machineType, operator, network, uu
|
125
|
128
|
end
|
126
|
129
|
|
127
|
130
|
-- 服务端登出埋点
|
128
|
|
-function root.logLogout(uid, channel, runTimes, version, battleCount, items, isFinishGuide, guideStep)
|
|
131
|
+function root.logLogout(uid, bandShareCode, channel, version, runTimes)
|
129
|
132
|
local now = timeUtil.currentTime()
|
130
|
133
|
local date = timeUtil.toDate(now)
|
131
|
134
|
local dateStr = timeUtil.toString(now)
|
|
@@ -134,9 +137,10 @@ function root.logLogout(uid, channel, runTimes, version, battleCount, items, isF
|
134
|
137
|
date,
|
135
|
138
|
dateStr,
|
136
|
139
|
uid or "",
|
|
140
|
+ bandShareCode or "",
|
137
|
141
|
channel or "",
|
138
|
|
- runTimes or "",
|
139
|
|
- version or ""
|
|
142
|
+ version or "",
|
|
143
|
+ runTimes or ""
|
140
|
144
|
}
|
141
|
145
|
local dataStr = root.formatData(data)
|
142
|
146
|
-- 添加到每日活跃信息中
|
|
@@ -159,6 +163,7 @@ function root.logPay(playerInfo, orderInfo)
|
159
|
163
|
dateStr,
|
160
|
164
|
playerInfo.uid or "",
|
161
|
165
|
playerInfo.bandShareCode or "",
|
|
166
|
+ playerInfo.channel or "",
|
162
|
167
|
playerInfo.version or "",
|
163
|
168
|
orderInfo.orderNo or "",
|
164
|
169
|
orderInfo.pay or "",
|
|
@@ -172,4 +177,23 @@ function root.logPay(playerInfo, orderInfo)
|
172
|
177
|
writeServerLog("pay", date, dataStr)
|
173
|
178
|
end
|
174
|
179
|
|
|
180
|
+-- 绑定推广码
|
|
181
|
+function root.logBandShareCode(uid, bandShareCode, channel, version)
|
|
182
|
+ local now = timeUtil.currentTime()
|
|
183
|
+ local date = timeUtil.toDate(now)
|
|
184
|
+ local dateStr = timeUtil.toString(now)
|
|
185
|
+
|
|
186
|
+ local data = {
|
|
187
|
+ date,
|
|
188
|
+ dateStr,
|
|
189
|
+ uid or "",
|
|
190
|
+ bandShareCode or "",
|
|
191
|
+ channel or "",
|
|
192
|
+ version or ""
|
|
193
|
+ }
|
|
194
|
+ local dataStr = root.formatData(data)
|
|
195
|
+
|
|
196
|
+ writeServerLog("banding", date, dataStr)
|
|
197
|
+end
|
|
198
|
+
|
175
|
199
|
return root
|