优化ltv模型账户过滤条件

This commit is contained in:
haoqiyue 2022-12-31 11:47:56 +08:00
parent 1ba4c981e9
commit f0511b004d

View File

@ -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 "AND" in where_account_str:
where_account_str = where_account_str.split('AND')[1]
else:
if "orderid" in where_account_str:
where_account_str = "1=1"
else:
where_account_str = where_account_str.split('AND')[0]
if self.game == 'huixie' and quota == '#distinct_id':
event_n='new_device'
else: