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
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
alpha
sun
Commits
0a56dbb6
Commit
0a56dbb6
authored
Aug 22, 2019
by
许俊鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xujunpeng/feature/add_product' into 'test'
后台帖子表增加人脸字段 See merge request
!325
parents
b44f8e33
106f2ef0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
product.py
api/product.py
+13
-0
topic.py
api/topic.py
+2
-0
urls.py
api/urls.py
+1
-0
No files found.
api/product.py
View file @
0a56dbb6
...
...
@@ -204,3 +204,16 @@ class ProductUpdateView(APIView):
category_ids
=
category_ids
,
effect_ids
=
effect_ids
,
is_online
=
is_online
,
brand_id
=
brand_id
)
.
unwrap
()
return
data
class
ProductSearchView
(
APIView
):
def
post
(
self
,
request
):
name
=
request
.
POST
.
get
(
'name'
)
if
not
name
:
return
r'缺少参数'
data
=
self
.
rpc
[
'neptune/commodity/product/search'
](
name
=
name
)
.
unwrap
()
return
data
api/topic.py
View file @
0a56dbb6
...
...
@@ -146,6 +146,8 @@ class TopicUpdateOrCreateView(APIView):
'is_home'
:
int
(
request
.
POST
.
get
(
'is_home'
,
0
)),
'is_recommend'
:
int
(
request
.
POST
.
get
(
'is_recommend'
,
0
)),
'body_esthetics_tag_ids'
:
body_esthetics_tag_ids
,
'product_id'
:
request
.
POST
.
get
(
'product_id'
),
'have_face'
:
request
.
POST
.
get
(
'have_face'
),
}
try
:
self
.
rpc
[
'venus/sun/topic/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
api/urls.py
View file @
0a56dbb6
...
...
@@ -208,6 +208,7 @@ urlpatterns = [
url
(
r'^product/create$'
,
ProductCreateView
.
as_view
()),
url
(
r'^product/update$'
,
ProductUpdateView
.
as_view
()),
url
(
r'^product/info$'
,
ProductInfoView
.
as_view
()),
url
(
r'^product/search'
,
ProductSearchView
.
as_view
()),
# 商品类目
url
(
r'^category/list$'
,
CategoryListView
.
as_view
()),
...
...
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