From 893a129c59c5316d8241d023a4d8864566afe83d Mon Sep 17 00:00:00 2001 From: wuaho Date: Fri, 16 Apr 2021 20:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AE=B0=E8=A7=92=E8=89=B2=E7=BC=96?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler_data/ta_handler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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: