diff --git a/handler_data/ta_handler.py b/handler_data/ta_handler.py index c2178d5..ea88fb0 100644 --- a/handler_data/ta_handler.py +++ b/handler_data/ta_handler.py @@ -94,20 +94,20 @@ async def order_idx(request, rdb, data): @TaHandler async def role_idx(request, rdb, data): """ - 标记新设备 + 标记角色编号 :param request: :param rdb: :param data: :return: """ # 条件 - if data.get('#type') == 'user' and data.get('#event_name') == 'setOnce': + if data.get('#type') == 'track' and data.get('#event_name') == 'create_role': # key = $appid.$binduid v : uid - binduid = data.get("properties", {}).get("binduid") + account = data.get("properties", {}).get("account") account_id = data.get("#account_id") - if binduid and account_id: - key = f'{data["#app_id"]}_{binduid}_roles' + if account and account_id: + key = f'{data["#app_id"]}_{account}_roles' v = await rdb.execute('sadd', key, account_id) # 新角色 编号 if v == 1: