|
@@ -430,7 +430,7 @@ class ReportPush(object):
|
|
|
"""
|
|
|
|
|
|
def __init__(self, db_name):
|
|
|
- self.db = MysqlDB(db_name)
|
|
|
+ self.db = MysqlDB(db_name, db_type=1)
|
|
|
|
|
|
def report_data_query(self, task_key):
|
|
|
"""
|
|
@@ -894,8 +894,8 @@ class ReportPush(object):
|
|
|
result = []
|
|
|
ids = self.db.select(self.sql_5_1, [brand_ids])
|
|
|
for x in ids:
|
|
|
- if x not in result:
|
|
|
- result.append(x)
|
|
|
+ if x[0] not in result:
|
|
|
+ result.append(x[0])
|
|
|
return result
|
|
|
|
|
|
def get_time_range(self, task_key):
|
|
@@ -922,6 +922,7 @@ class ReportPush(object):
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- # rp = ReportPush('linshi')
|
|
|
- for i in range(1, 11):
|
|
|
- print(i)
|
|
|
+ rp = ReportPush('linshi')
|
|
|
+ sql = "select house_id from t_house_management"
|
|
|
+ for x in rp.db.select(sql):
|
|
|
+ print(x[0])
|