Commit bb9cf09f authored by 高雅喆's avatar 高雅喆

搜索结果页关注标签按钮action更新

parent 9f69136b
...@@ -181,7 +181,7 @@ class CollectData(object): ...@@ -181,7 +181,7 @@ class CollectData(object):
raw_val_dict = json.loads(ori_msg.value) raw_val_dict = json.loads(ori_msg.value)
if "type" in raw_val_dict and \ if "type" in raw_val_dict and \
(raw_val_dict["type"] in ("on_click_feed_topic_card","tag_zone_click_focus")): (raw_val_dict["type"] in ("on_click_feed_topic_card","on_click_button")):
click_topic_tag_list = list() click_topic_tag_list = list()
if "on_click_feed_topic_card" == raw_val_dict["type"]: if "on_click_feed_topic_card" == raw_val_dict["type"]:
...@@ -210,16 +210,18 @@ class CollectData(object): ...@@ -210,16 +210,18 @@ class CollectData(object):
logging.info("positive tag_list,device_id:%s,topic_id:%s,tag_list:%s" % ( logging.info("positive tag_list,device_id:%s,topic_id:%s,tag_list:%s" % (
str(device_id), str(topic_id), str(click_topic_tag_list))) str(device_id), str(topic_id), str(click_topic_tag_list)))
else: elif raw_val_dict["type"] == "on_click_button" and "page_name" in \
tag_name = raw_val_dict["params"]["query"] raw_val_dict["params"] and "button_name" in raw_val_dict["params"] \
query_type = raw_val_dict["params"]["type"] and "extra_param" in raw_val_dict["params"]:
device_id = raw_val_dict["device"]["device_id"] if raw_val_dict["params"]["page_name"] == "search_detail" and \
user_id = raw_val_dict["user_id"] if "user_id" in raw_val_dict else None raw_val_dict["params"]["button_name"] == "focus_tag":
if query_type=="do": tag_name = raw_val_dict["params"]["extra_param"]
device_id = raw_val_dict["device"]["device_id"]
user_id = raw_val_dict["user_id"] if "user_id" in raw_val_dict else None
tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(name=tag_name,is_online=True,is_deleted=False, is_category=False).values_list("id",flat=True)) tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(name=tag_name,is_online=True,is_deleted=False, is_category=False).values_list("id",flat=True))
click_topic_tag_list.extend(tag_list) click_topic_tag_list.extend(tag_list)
logging.info("query tag attention,positive tag_list,device_id:%s,query_name:%s,tag_list:%s" % ( logging.info("query tag attention,positive tag_list,device_id:%s,query_name:%s,tag_list:%s" % (
str(device_id), tag_name, str(click_topic_tag_list))) str(device_id), tag_name, str(click_topic_tag_list)))
logging.info("click_topic_tag_list:%s"%(str(click_topic_tag_list))) logging.info("click_topic_tag_list:%s"%(str(click_topic_tag_list)))
......
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