Commit f77719bf authored by 李小芳's avatar 李小芳

Merge branch 'new_smr_table' into 'master'

new_smr

See merge request !11
parents f8f6c48f 6a944309
......@@ -481,7 +481,7 @@ class Tractate(models.Model):
delta = datetime.timedelta(days=1)
n_days = today - delta
date_change = str(n_days).replace("-", "")
score = StrategyTractateSmrScore.objects.using(settings.DORIS_DB_NAME).filter(
score = StrategyTractateSmrScoreV2.objects.using(settings.DORIS_DB_NAME).filter(
tractate_id=tractate_id).order_by('-create_date').values_list("smart_rank_score",
flat=True).first()
if score:
......@@ -716,6 +716,14 @@ class StrategyTractateSmrScore(models.Model):
smart_rank_score = models.FloatField(verbose_name=u'新的smr_score', blank=True, default=0)
create_date = models.BigIntegerField(max_length=50, verbose_name="时间")
class StrategyTractateSmrScoreV2(models.Model):
class Meta:
db_table = 'search_strategy_tractate_new_smart_rank_score_v2'
tractate_id = models.IntegerField(unique=True)
smart_rank_score = models.FloatField(verbose_name=u'新的smr_score', blank=True, default=0)
create_date = models.BigIntegerField(max_length=50, verbose_name="时间")
class SearchStrategyTractateSmrScore(models.Model):
class Meta:
......
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