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()