From dfb1512b3fb392ab54cc6182e42fd5e8962367ff Mon Sep 17 00:00:00 2001 From: luying Date: Tue, 24 May 2022 11:12:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=95=B0=EF=BC=9A=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=A2=9E=E5=8A=A0distinctId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/sdkService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game-server/app/services/sdkService.ts b/game-server/app/services/sdkService.ts index 9e70c6551..c00f8973f 100644 --- a/game-server/app/services/sdkService.ts +++ b/game-server/app/services/sdkService.ts @@ -183,14 +183,14 @@ export function connectThinkingData(app: Application) { } } -export function reportTAEvent(roleId: string, eventName: string, properties: any, ip?: string) { +export function reportTAEvent(roleId: string, eventName: string, properties: any, ip?: string, distinctId?: string) { let ta = pinus.app.get('ta'); if(!ta) return let event = { // 账号 ID (可选) accountId: `${roleId}`, // 访客 ID (可选),账号 ID 和访客 ID 不可以都为空 - distinctId: "", + distinctId: (distinctId && distinctId != 'weikaiqishushu')? `${distinctId}`:"", // 事件名称 (必填) event: eventName, // 事件时间 (可选) 如果不填,将以调用接口时的时间作为事件时间 @@ -235,7 +235,7 @@ export function reportTAUserSet(type: TA_USERSET_TYPE, roleId: string, propertie export async function reportCreateRoleEventToTa(role: RoleType, ip: string) { if(role.shushuMark) { - reportTAEvent(role.roleId, TA_EVENT.CREATE_ROLE, null, ip); + reportTAEvent(role.roleId, TA_EVENT.CREATE_ROLE, null, ip, role.shushuMark); await RoleModel.updateRoleInfo(role.roleId, { shushuMark: '' }); } }