From 945abb54f6478d4b18036710a00900a6a90d914c Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 3 Sep 2019 15:40:44 +0800 Subject: [PATCH] fix bug --- get_new_user.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/get_new_user.py b/get_new_user.py index fb710c5..95d1620 100644 --- a/get_new_user.py +++ b/get_new_user.py @@ -32,7 +32,22 @@ class InitFirstAD(): self.tga.init_tga_write(self.tgaid) def get_ad_channel(self): - sql =f"""select distinct ad_c""" + sql = f"""SELECT + DISTINCT first_ad_channel + FROM + v_user_{self.suffix} + where + gameid='{self.gameid}'""" + temp = [] + data = self.tga.get_data(sql) + if data: + for line in data: + try: + temp.append(line[0]) + except Exception: + log.error(f"split data {line} failed", exc_info=True) + return temp + def run(self): ad_channels = self.get_ad_channel()