From f0511b004daae8f60189a215ca8101588a488222 Mon Sep 17 00:00:00 2001 From: haoqiyue <1293971940@qq.com> Date: Sat, 31 Dec 2022 11:47:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ltv=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E8=B4=A6=E6=88=B7=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/x_analysis.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/x_analysis.py b/models/x_analysis.py index 8a5b2ec..15593fc 100644 --- a/models/x_analysis.py +++ b/models/x_analysis.py @@ -260,10 +260,11 @@ class XAnalysis: qry = sa.select().where(*where_account) sql = str(qry.compile(compile_kwargs={"literal_binds": True})) where_account_str = sql.split('WHERE ')[1] - if "orderid" in where_account_str: - where_account_str = "1=1" + if "AND" in where_account_str: + where_account_str = where_account_str.split('AND')[1] else: - where_account_str = where_account_str.split('AND')[0] + if "orderid" in where_account_str: + where_account_str = "1=1" if self.game == 'huixie' and quota == '#distinct_id': event_n='new_device' else: