diff --git a/src/models/RoleLog.lua b/src/models/RoleLog.lua index 6ab1c8a..a14c823 100644 --- a/src/models/RoleLog.lua +++ b/src/models/RoleLog.lua @@ -543,20 +543,26 @@ local function isIos(self) return sid == 2 end -local appid, sdkId +local sdkId +local AppId = { + [1] = 4787, + [2] = 4788, + [3] = 4789, +} local function getBaseLog(self) local uid = self:getProperty("uid") - if not appid then - appid, sdkId = string.match(uid, "(.*)_(.*)") - if not appid then + local sid = self:getProperty("sid") + if not sdkId then + _, sdkId = string.match(uid, "(.*)_(.*)") + if not _ then sdkId = uid - appid = 0 end end + local log = { server_id = server_id, timestamp = skynet.timex(), - app_id = appid, + app_id = AppId[sid] or 0, plat_id = isIos(self) and 0 or 1, sdk_uid = sdkId, account_id = uid, -- libgit2 0.21.2