Commit cb628205 authored by 段英荣's avatar 段英荣

增加榜单push推荐标签

parent f167a8df
......@@ -122,6 +122,19 @@ def query_by_tag_type(tag_type_id,offset,size):
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"tag_list": []}
@bind("physical/search/choice_pictorial_push_tag")
def choice_pictorial_push_tag(device_id, user_id):
try:
linucb_recommend_redis_prefix = "physical:linucb:tag_recommend:device_id:"
tag_recommend_redis_key = linucb_recommend_redis_prefix + str(device_id)
linucb_recommend_tag_data = redis_client.get(tag_recommend_redis_key)
linucb_recommend_tag_list = json.loads(linucb_recommend_tag_data) if linucb_recommend_tag_data else []
return {"pictorial_tag_list": linucb_recommend_tag_list[:50]}
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"pictorial_tag_list": []}
@bind("physical/search/choice_push_tag")
def choice_push_tag(device_id, user_id):
......
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