Commit fc6a75e00bf5fa65e906ee4cb8748b4762ff354b

Authored by zhouhaihai
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,20 +544,26 @@ local function isIos(self)
544 return sid == 2 544 return sid == 2
545 end 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 local function getBaseLog(self) 553 local function getBaseLog(self)
549 local uid = self:getProperty("uid") 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 sdkId = uid 559 sdkId = uid
554 - appid = 0  
555 end 560 end
556 end 561 end
  562 +
557 local log = { 563 local log = {
558 server_id = server_id, 564 server_id = server_id,
559 timestamp = skynet.timex(), 565 timestamp = skynet.timex(),
560 - app_id = appid, 566 + app_id = AppId[sid] or 0,
561 plat_id = isIos(self) and 0 or 1, 567 plat_id = isIos(self) and 0 or 1,
562 sdk_uid = sdkId, 568 sdk_uid = sdkId,
563 account_id = uid, 569 account_id = uid,