Commit fc6a75e00bf5fa65e906ee4cb8748b4762ff354b
1 parent
0ce1cab5
appid
Showing
1 changed file
with
12 additions
and
6 deletions
Show diff stats
src/models/RoleLog.lua
| ... | ... | @@ -544,20 +544,26 @@ local function isIos(self) |
| 544 | 544 | return sid == 2 |
| 545 | 545 | end |
| 546 | 546 | |
| 547 | -local appid, sdkId | |
| 547 | +local sdkId | |
| 548 | +local AppId = { | |
| 549 | + [1] = 4787, | |
| 550 | + [2] = 4788, | |
| 551 | + [3] = 4789, | |
| 552 | +} | |
| 548 | 553 | local function getBaseLog(self) |
| 549 | 554 | local uid = self:getProperty("uid") |
| 550 | - if not appid then | |
| 551 | - appid, sdkId = string.match(uid, "(.*)_(.*)") | |
| 552 | - if not appid then | |
| 555 | + local sid = self:getProperty("sid") | |
| 556 | + if not sdkId then | |
| 557 | + _, sdkId = string.match(uid, "(.*)_(.*)") | |
| 558 | + if not _ then | |
| 553 | 559 | sdkId = uid |
| 554 | - appid = 0 | |
| 555 | 560 | end |
| 556 | 561 | end |
| 562 | + | |
| 557 | 563 | local log = { |
| 558 | 564 | server_id = server_id, |
| 559 | 565 | timestamp = skynet.timex(), |
| 560 | - app_id = appid, | |
| 566 | + app_id = AppId[sid] or 0, | |
| 561 | 567 | plat_id = isIos(self) and 0 or 1, |
| 562 | 568 | sdk_uid = sdkId, |
| 563 | 569 | account_id = uid, | ... | ... |