Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mentha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
mentha
Commits
f77719bf
Commit
f77719bf
authored
Dec 22, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'new_smr_table' into 'master'
new_smr See merge request
!11
parents
f8f6c48f
6a944309
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
tractate.py
talos/models/tractate/tractate.py
+9
-1
No files found.
talos/models/tractate/tractate.py
View file @
f77719bf
...
...
@@ -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
=
StrategyTractateSmrScore
V2
.
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment