Commit 64e24010 authored by 段英荣's avatar 段英荣

add poctorial

parent 2c878e41
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"tag_name":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"}, "tag_name":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"},
"topic_id_list":{"type":"long"}, "topic_id_list":{"type":"long"},
"effective":{"type":"boolean"}, "effective":{"type":"boolean"},
"offline_score":{"type":"long"} "offline_score":{"type":"long"},
"is_default":{"type":"long"}
} }
} }
\ No newline at end of file
...@@ -59,6 +59,7 @@ class Pictorial(models.Model): ...@@ -59,6 +59,7 @@ class Pictorial(models.Model):
icon = models.CharField(verbose_name=u'画报名称', max_length=255) icon = models.CharField(verbose_name=u'画报名称', max_length=255)
topic_num = models.IntegerField(verbose_name=u'次数') topic_num = models.IntegerField(verbose_name=u'次数')
add_score = models.IntegerField(verbose_name=u'人工权重') add_score = models.IntegerField(verbose_name=u'人工权重')
is_default = models.IntegerField(verbose_name=u"是否是默认画报")
def get_topic_id(self): def get_topic_id(self):
try: try:
......
...@@ -65,6 +65,7 @@ class PictorialTransfer(object): ...@@ -65,6 +65,7 @@ class PictorialTransfer(object):
res["topic_id_list"] =instance.get_topic_id() res["topic_id_list"] =instance.get_topic_id()
res["effective"] = instance.get_effective(res["topic_id_list"]) res["effective"] = instance.get_effective(res["topic_id_list"])
res["offline_score"] = cls.get_offline_score(instance,res["topic_id_list"]) res["offline_score"] = cls.get_offline_score(instance,res["topic_id_list"])
res["is_default"] = instance.is_default
return res return res
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......
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