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
alpha
physical
Commits
92ce6546
Commit
92ce6546
authored
Jul 24, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
3d257f19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
group.py
search/views/group.py
+11
-12
No files found.
search/views/group.py
View file @
92ce6546
...
...
@@ -504,26 +504,25 @@ def pictorial_topic_sort_peoplehot(pictorial_id=-1, user_id=-1, offset=0, size=1
return
{
"pict_pictorial_ids_list"
:
[]}
@bind
(
"physical/search/pictorial_activity_
topic
"
)
def
get_pictorial_activeity_
topic_sort
(
activity_id
=
0
,
topic
_id
=
0
):
@bind
(
"physical/search/pictorial_activity_
sort
"
)
def
get_pictorial_activeity_
sort
(
activity_id
=
0
,
pictorial
_id
=
0
):
try
:
pictorial_activity_
topic_sort
=
[]
pictorial_activity_
sort_only
=
[]
pictorial_ids_list
=
pictorial_activity_sort
(
activity_id
=
activity_id
,
size
=
999
,
offset
=
0
,
sort_type
=
1
)
logging
.
info
(
"get pictorial_ids_list:
%
s"
%
pictorial_ids_list
)
data
=
pictorial_ids_list
.
get
(
"pictorial_activity_sort"
,
[])
logging
.
info
(
"get data:
%
s"
%
data
)
if
data
:
pictorial_id
=
[]
pictorial_id
s
=
[]
for
item
in
data
:
pictorial_id
.
append
(
item
[
"pictorial_id"
])
if
topic_id
in
pictorial_id
:
topic_sort
=
pictorial_id
.
index
(
topic_id
)
pictorial_activity_topic_sort
.
append
({
"topic"
:
topic_id
,
"topic_sort"
:
topic_sort
+
1
})
pictorial_ids
.
append
(
item
[
"pictorial_id"
])
if
pictorial_id
in
pictorial_ids
:
pictorial_sort
=
pictorial_ids
.
index
(
pictorial_id
)
pictorial_activity_sort_only
.
append
({
"pictorial_id"
:
pictorial_id
,
"pictorial_sort"
:
pictorial_sort
+
1
})
else
:
pictorial_activity_
topic_sort
.
append
({
"topic"
:
topic_id
,
"topic
_sort"
:
1000
})
return
{
"pictorial_activity_
topic_sort"
:
pictorial_activity_topic_sort
}
pictorial_activity_
sort_only
.
append
({
"pictorial_id"
:
pictorial_id
,
"pictorial
_sort"
:
1000
})
return
{
"pictorial_activity_
sort"
:
pictorial_activity_sort_only
}
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
{
"pictorial_activity_
topic_
sort"
:
[]}
return
{
"pictorial_activity_sort"
:
[]}
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