Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
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
谢林臻
sun
Commits
a59683e8
Commit
a59683e8
authored
Jul 04, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'dev'
add info in product info api See merge request
alpha/sun!228
parents
bde8acc8
1f66e433
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
product.py
api/product.py
+2
-0
No files found.
api/product.py
View file @
a59683e8
...
@@ -129,6 +129,8 @@ class ProductInfoView(APIView):
...
@@ -129,6 +129,8 @@ class ProductInfoView(APIView):
brand_info
=
self
.
rpc
[
'neptune/commodity/brand/infos'
](
product_id
=
id_
)
.
unwrap
()
brand_info
=
self
.
rpc
[
'neptune/commodity/brand/infos'
](
product_id
=
id_
)
.
unwrap
()
data
[
'brand_name'
]
=
brand_info
[
0
]
.
get
(
'cn_name'
)
if
brand_info
else
''
data
[
'brand_name'
]
=
brand_info
[
0
]
.
get
(
'cn_name'
)
if
brand_info
else
''
classify_infos
=
self
.
rpc
[
'neptune/commodity/classify/infos'
](
product_ids
=
[
id_
])
.
unwrap
()
data
[
'classify_names'
]
=
[
obj
.
get
(
'cn_name'
)
for
obj
in
classify_infos
]
data
[
'category_names'
]
=
self
.
get_category_names
(
id_
)
data
[
'category_names'
]
=
self
.
get_category_names
(
id_
)
data
[
'effect_names'
]
=
self
.
get_effect_names
(
id_
)
data
[
'effect_names'
]
=
self
.
get_effect_names
(
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