|
@@ -245,8 +245,7 @@ class Mvp:
|
|
|
NAME
|
|
|
FROM
|
|
|
mvp_icon
|
|
|
- WHERE
|
|
|
- NAME = '%s
|
|
|
+ WHERE status = 1
|
|
|
'''
|
|
|
|
|
|
# 行为更新图标
|
|
@@ -499,23 +498,23 @@ class Mvp:
|
|
|
tag_name = data[2]
|
|
|
crowd = data[3]
|
|
|
tag_score = data[4]
|
|
|
- if key == '用户画像-行为兴趣' and city == '上海市' and age == '85后':
|
|
|
- pass
|
|
|
- else:
|
|
|
- for id in ids:
|
|
|
- city_1 = id[2]
|
|
|
- age_1 = id[1]
|
|
|
- crowd_1 = id[3]
|
|
|
- id_1 = id[0]
|
|
|
- if city == city_1 and age == age_1 and crowd == crowd_1:
|
|
|
- insert_data.append([id_1, tag_name, tag_score])
|
|
|
+ # if key == '用户画像-行为兴趣' and city == '上海市' and age == '85后':
|
|
|
+ # pass
|
|
|
+ # else:
|
|
|
+ for id in ids:
|
|
|
+ city_1 = id[2]
|
|
|
+ age_1 = id[1]
|
|
|
+ crowd_1 = id[3]
|
|
|
+ id_1 = id[0]
|
|
|
+ if city == city_1 and age == age_1 and crowd == crowd_1:
|
|
|
+ insert_data.append([id_1, tag_name, tag_score])
|
|
|
if len(insert_data) > 0:
|
|
|
table_name = self.get_table_name(key)
|
|
|
if table_name and table_name not in self.insert_table:
|
|
|
- if table_name == 'mvp_crowd_info_behavior':
|
|
|
- self.linshi_db.delete(self.sql_18)
|
|
|
- else:
|
|
|
- self.linshi_db.truncate(table_name)
|
|
|
+ # if table_name == 'mvp_crowd_info_behavior':
|
|
|
+ # self.linshi_db.delete(self.sql_18)
|
|
|
+ # else:
|
|
|
+ self.linshi_db.truncate(table_name)
|
|
|
self.linshi_db.add_some(insert_sql, insert_data)
|
|
|
self.insert_table.append(table_name)
|
|
|
else:
|
|
@@ -852,4 +851,7 @@ class Mvp:
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
+ # mvp = Mvp()
|
|
|
+ # mvp.linshi_db = MysqlDB('linshi', db_type=1)
|
|
|
+ # mvp.update_icon()
|
|
|
pass
|