Commit 2dccd818 authored by kai's avatar kai

update

parent 015dd599
......@@ -24,29 +24,5 @@
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
</code_scheme>
</component>
\ No newline at end of file
......@@ -415,7 +415,7 @@ class ESPerform(object):
},
"sort": [
{"_score": {"order": "desc"}},
{"latest_reply_time":{"order": "desc"}},
# {"latest_reply_time":{"order": "desc"}},
{"create_time_val": {"order": "desc"}},
{"language_type": {"order": "asc"}},
],
......
......@@ -17,6 +17,7 @@
"user_nick_name_pre": {"type":"text","analyzer":"keyword"}, //不切词的用户名
"group_id":{"type":"long"}, //所在组ID
"tag_list":{"type":"long"},//标签属性
"latest_reply_time":{"type":"date", "format":"date_time_no_millis"},
"useful_tag_list":{"type":"long"},//有用标签属性
"edit_tag_list":{"type":"long"},//编辑标签
"tag_name_list":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"},
......
......@@ -18,6 +18,7 @@
"group_id":{"type":"long"}, //所在组ID
"tag_list":{"type":"long"},//标签属性
"useful_tag_list":{"type":"long"},//有用标签属性
"latest_reply_time":{"type":"date", "format":"date_time_no_millis"},
"edit_tag_list":{"type":"long"},//编辑标签
"tag_name_list":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"},
"share_num":{"type":"long"},
......
......@@ -18,6 +18,7 @@
"group_id":{"type":"long"}, //所在组ID
"tag_list":{"type":"long"},//标签属性
"useful_tag_list":{"type":"long"},//有用标签属性
"latest_reply_time":{"type":"date", "format":"date_time_no_millis"},
"edit_tag_list":{"type":"long"},//编辑标签
"tag_name_list":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"},
"share_num":{"type":"long"},
......
......@@ -17,6 +17,7 @@
"user_nick_name_pre": {"type":"text","analyzer":"keyword"}, //不切词的用户名
"group_id":{"type":"long"}, //所在组ID
"tag_list":{"type":"long"},//标签属性
"latest_reply_time":{"type":"date", "format":"date_time_no_millis"},
"useful_tag_list":{"type":"long"},//有用标签属性
"edit_tag_list":{"type":"long"},//编辑标签
"tag_name_list":{"type":"text","analyzer":"gm_default_index","search_analyzer":"gm_default_index"},
......
......@@ -404,4 +404,18 @@ class TopicBillBoard(models.Model):
topic_id = models.IntegerField(verbose_name=u"帖子ID")
pictorial_id = models.IntegerField(verbose_name=u"榜单ID")
real_vote_cnt = models.IntegerField(verbose_name=u"真实赞")
virt_vote_cnt = models.IntegerField(verbose_name=u"虚拟赞")
\ No newline at end of file
virt_vote_cnt = models.IntegerField(verbose_name=u"虚拟赞")
class Reply(models.Model):
"""帖子回复"""
class Meta:
verbose_name = "帖子回复"
db_table = "reply"
topic_id = models.IntegerField(verbose_name=u"帖子ID")
user_id = models.IntegerField(verbose_name=u'用户ID')
create_time = models.DateTimeField(verbose_name=u'创建时间')
is_deleted = models.BooleanField(verbose_name=u'是否删除')
is_online = models.BooleanField(verbose_name=u'是否上线')
......@@ -78,6 +78,9 @@ class TopicTransfer(object):
# begin = time.time()
topic_useful_tag_id_list = instance.get_topic_useful_tag_id_list()
res["useful_tag_list"] = topic_useful_tag_id_list
latest_reply_time = instance.get_latest_reply_date()
res["latest_reply_time"] = latest_reply_time
# end = time.time()
# time5 = (end - begin)
# # 片假名
......
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