Commit 1a5a0406 authored by litaolemo's avatar litaolemo

update

parent f8d4c14d
......@@ -176,7 +176,7 @@ for device_id in sql_res:
# 设备对应画像数量
second_demands_tag_count = {}
projects_demands_tag_count = {}
# 帖子对应的tag
# 设备id对应的画像
second_demands_tag_dict = {}
projects_demands_tag_dict = {}
total_tag_count = {}
......@@ -199,7 +199,7 @@ for redis_count, device_id in enumerate(device_id_dict):
continue
if res.get("second_demands"):
second_demands = res.get("second_demands")
print(second_demands)
# print(second_demands)
for tag in second_demands:
if tag in second_demands_tag_count:
second_demands_tag_count[tag] += 1
......@@ -210,7 +210,7 @@ for redis_count, device_id in enumerate(device_id_dict):
second_demands_tag_dict[device_id] = second_demands
if res.get("projects"):
projects = res.get("projects")
print(projects)
# print(projects)
for tag in projects:
if tag in projects_demands_tag_count:
projects_demands_tag_count[tag] += 1
......@@ -282,8 +282,9 @@ for res in sql_res:
# card_id_set.update(card_id)
if cl_id in second_demands_tag_dict:
if int(card_id) in second_demands_card_id_list:
print(cl_id, second_demands_tag_dict[cl_id])
for tag_id in second_demands_tag_dict[cl_id]:
if tag_id in second_demands_id_count:
second_demands_id_count[tag_id][int(card_id)] = 1
else:
......@@ -297,6 +298,7 @@ for res in sql_res:
if cl_id in projects_demands_tag_dict:
if int(card_id) in tags_v3_card_id_list:
print(cl_id,projects_demands_tag_dict[cl_id])
for tag_id in projects_demands_tag_dict[cl_id]:
if tag_id in projects_demands_id_count:
projects_demands_id_count[tag_id][int(card_id)] = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment