From e5430af5e19395d016a3fb74a7f6280a8cd855a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Fri, 14 Oct 2022 13:41:09 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A4=84=E7=90=86=E4=BA=8B=E4=BB=B6=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=8E=BB=E9=87=8D=E6=95=B0=E6=97=A0=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/query.py | 7 ++++--- models/behavior_analysis.py | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index e4ffb4b..f1fb988 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -2277,10 +2277,11 @@ async def user_property_model( key = str(key) data[key] = val title = ['.'.join(groupby), quota] - data=list(data.values()) + value=list(data.values()) return schemas.Msg(code=0, msg='ok', data={ - 'value': data, - 'title': title + 'value': value, + 'title': title, + 'key':list(data.keys()) }) diff --git a/models/behavior_analysis.py b/models/behavior_analysis.py index bf1b79a..762def2 100644 --- a/models/behavior_analysis.py +++ b/models/behavior_analysis.py @@ -628,6 +628,8 @@ class BehaviorAnalysis: base_where.append(event_name_col == event_name) analysis = event['analysis'] + if analysis == 'distinct_count': # 事件分析-int类型去重数用到 + analysis='uniqExact' event_filter, user_filter = await self.handler_filts( (event['filts'], event.get('relation', 'and')), (self.global_filters, self.global_relation)