Commit 2755963b authored by 高雅喆's avatar 高雅喆

update

parent c2681d9b
......@@ -7,6 +7,8 @@
"is_new_pictorial":{"type":"boolean"},
"pictorial_ctr_30":{"type": "double"},
"like_rate_30":{"type": "double"},
"pictorial_ctr_all":{"type": "double"},
"like_rate_all":{"type": "double"},
"is_recommend":{"type":"boolean"},
"name":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_search"},
"description":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_search"},
......
......@@ -55,11 +55,13 @@ class LikePictorialStat(models.Model):
try:
is_new_pictorial = LikePictorialStat.objects.using(settings.SLAVE1_DB_NAME).filter(pictorial_id=pictorial_id).values_list(
"is_new_pictorial", flat=True).first()
return is_new_pictorial
if is_new_pictorial:
return is_new_pictorial
else:
return 1
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return 0
return 1
@classmethod
def get_pictorial_ctr_30(cls, pictorial_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