Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
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
0
Merge Requests
0
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
钟尚武
physical
Commits
6cc69075
Commit
6cc69075
authored
Dec 08, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
603793b9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
group.py
search/views/group.py
+3
-0
pick.py
search/views/pick.py
+6
-0
topic.py
search/views/topic.py
+3
-0
user.py
search/views/user.py
+3
-0
No files found.
search/views/group.py
View file @
6cc69075
...
@@ -43,6 +43,9 @@ def group_sort(user_id=-1,sort_type=GroupSortTypes.HOT_RECOMMEND,offset=0,size=1
...
@@ -43,6 +43,9 @@ def group_sort(user_id=-1,sort_type=GroupSortTypes.HOT_RECOMMEND,offset=0,size=1
:return:
:return:
"""
"""
try
:
try
:
if
not
isinstance
(
user_id
,
int
):
user_id
=
-
1
if
sort_type
==
GroupSortTypes
.
HOT_RECOMMEND
:
if
sort_type
==
GroupSortTypes
.
HOT_RECOMMEND
:
group_ids_list
=
GroupUtils
.
get_hot_group_recommend_result_list
(
offset
,
size
)
group_ids_list
=
GroupUtils
.
get_hot_group_recommend_result_list
(
offset
,
size
)
...
...
search/views/pick.py
View file @
6cc69075
...
@@ -13,6 +13,9 @@ from search.utils.common import PickType
...
@@ -13,6 +13,9 @@ from search.utils.common import PickType
@bind
(
"physical/search/pick_celebrity"
)
@bind
(
"physical/search/pick_celebrity"
)
def
pick_celebrity
(
user_id
,
pick_id
,
offset
=
0
,
size
=
10
):
def
pick_celebrity
(
user_id
,
pick_id
,
offset
=
0
,
size
=
10
):
try
:
try
:
if
not
isinstance
(
user_id
,
int
):
user_id
=
-
1
have_read_pick_celebrity_ids
=
list
()
have_read_pick_celebrity_ids
=
list
()
redis_key
=
"physical:pick_celebrity:"
+
"user_id:"
+
str
(
user_id
)
+
":pick_id:"
+
str
(
pick_id
)
redis_key
=
"physical:pick_celebrity:"
+
"user_id:"
+
str
(
user_id
)
+
":pick_id:"
+
str
(
pick_id
)
...
@@ -42,6 +45,9 @@ def pick_celebrity(user_id,pick_id,offset=0,size=10):
...
@@ -42,6 +45,9 @@ def pick_celebrity(user_id,pick_id,offset=0,size=10):
@bind
(
"physical/search/pick_topic"
)
@bind
(
"physical/search/pick_topic"
)
def
pick_topic
(
user_id
,
pick_id
,
offset
=
0
,
size
=
10
):
def
pick_topic
(
user_id
,
pick_id
,
offset
=
0
,
size
=
10
):
try
:
try
:
if
not
isinstance
(
user_id
,
int
):
user_id
=
-
1
have_read_pick_topic_ids
=
list
()
have_read_pick_topic_ids
=
list
()
redis_key
=
"physical:pick_topic:"
+
"user_id:"
+
str
(
user_id
)
+
":pick_id:"
+
str
(
pick_id
)
redis_key
=
"physical:pick_topic:"
+
"user_id:"
+
str
(
user_id
)
+
":pick_id:"
+
str
(
pick_id
)
...
...
search/views/topic.py
View file @
6cc69075
...
@@ -144,6 +144,9 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u
...
@@ -144,6 +144,9 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u
:return:
:return:
"""
"""
try
:
try
:
if
not
isinstance
(
user_id
,
int
):
user_id
=
-
1
# 获取帖子标签列表
# 获取帖子标签列表
topic_tag_list
=
TopicUtils
.
get_topic_tag_id_list
(
topic_id
)
topic_tag_list
=
TopicUtils
.
get_topic_tag_id_list
(
topic_id
)
...
...
search/views/user.py
View file @
6cc69075
...
@@ -23,6 +23,9 @@ def recommend_user(self_user_id,interesting_user_id,offset=0,size=10):
...
@@ -23,6 +23,9 @@ def recommend_user(self_user_id,interesting_user_id,offset=0,size=10):
:return:
:return:
"""
"""
try
:
try
:
if
not
isinstance
(
self_user_id
,
int
):
self_user_id
=
-
1
#获取关注用户列表
#获取关注用户列表
(
self_attention_user_id_list
,
recursion_attention_user_id_list
)
=
UserUtils
.
get_attention_user_list
([
self_user_id
,
interesting_user_id
],
self_user_id
)
(
self_attention_user_id_list
,
recursion_attention_user_id_list
)
=
UserUtils
.
get_attention_user_list
([
self_user_id
,
interesting_user_id
],
self_user_id
)
...
...
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