Commit a276c897 authored by 谢祁峰's avatar 谢祁峰

fix

parent 0795d15b
......@@ -617,14 +617,14 @@ class CollectData(object):
'SYS'] and "api/v1/cards/topic" in \
data['SYS'][
'action']:
tag_name = raw_val_dict["APP"].get("query", "")
tag_id = raw_val_dict["APP"].get("action")
tag_name = data["APP"].get("query", "")
tag_id = data["APP"].get("tag_id", "")
tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(
tag=tag_name).values_list("id"))
tag_list.append(tag_id)
logging.info("action=home_page_search,tagid_list:%s" % tag_list)
device_id = raw_val_dict["device"]["device_id"]
user_id = raw_val_dict["user_id"] if "user_id" in raw_val_dict else None
device_id = data['SYS']['cl_id']
user_id = data['SYS'].get('user_id', None)
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id, tag_list,
5)
logging.info("action=home_page_search,update lintag success")
......@@ -632,24 +632,24 @@ class CollectData(object):
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
("venus/community/topic/create" in data['SYS'][
'action'] or "venus/sun/topic/edit" in data['SYS']['action']):
tag_ids = list(raw_val_dict["APP"].get("tag_ids", []))
tag_ids = list(data["APP"].get("tag_ids", []))
tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(
id__in=tag_ids, is_online=True, is_deleted=False,
is_category=False).values_list("id"))
device_id = raw_val_dict["device"]["device_id"]
user_id = raw_val_dict["user_id"] if "user_id" in raw_val_dict else None
device_id = data['SYS']['cl_id']
user_id = data['SYS'].get('user_id', None)
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
tag_list,
10)
# 创建问题关注标签关键字进linucb
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
"venus/sun/pictorial/edit" in data['SYS']['action']:
tag_ids = list(raw_val_dict["APP"].get("tag_ids", []))
tag_ids = list(data["APP"].get("tag_ids", []))
tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(
id__in=tag_ids, is_online=True, is_deleted=False,
is_category=False).values_list("id"))
device_id = raw_val_dict["device"]["device_id"]
user_id = raw_val_dict["user_id"] if "user_id" in raw_val_dict else None
device_id = data['SYS']['cl_id']
user_id = data['SYS'].get('user_id', None)
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
tag_list,
20)
......
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