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
5bb1c95a
Commit
5bb1c95a
authored
Aug 08, 2019
by
张英杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sun 测肤变更数据接口
parent
a958fa6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
skin_check.py
api/skin_check.py
+22
-2
No files found.
api/skin_check.py
View file @
5bb1c95a
...
@@ -17,7 +17,7 @@ from alpha_types.venus.enum import (
...
@@ -17,7 +17,7 @@ from alpha_types.venus.enum import (
)
)
from
utils.base
import
APIView
,
get_offset_count
from
utils.base
import
APIView
,
get_offset_count
from
utils.logger
import
error_logger
from
utils.logger
import
error_logger
,
info_logger
class
SkinCheckPictorial
(
APIView
):
class
SkinCheckPictorial
(
APIView
):
...
@@ -37,8 +37,28 @@ class SkinCheckPictorial(APIView):
...
@@ -37,8 +37,28 @@ class SkinCheckPictorial(APIView):
return
data
return
data
def
post
(
self
,
request
):
def
post
(
self
,
request
):
"""
榜单信息创建 or 更新
:param request:
:return:
"""
_data
=
json
.
loads
(
request
.
POST
.
get
(
"pictorial_info"
)
or
"[]"
)
# 对变更数据做一层封装
modify_data
=
[]
modify_data
=
[]
for
info
in
_data
:
_skin_classify
=
info
.
get
(
"skin_classify"
,
""
)
if
_skin_classify
in
SKIN_ALL_CLASSIFY
:
_data
=
{
"skin_classify"
:
_skin_classify
,
"url"
:
info
.
get
(
"url"
,
""
),
"content"
:
info
.
get
(
"content"
,
""
),
}
modify_data
.
append
(
_data
)
info_logger
.
info
(
"skin_check pictorial modify data: {}"
.
format
(
json
.
dumps
(
modify_data
)))
if
modify_data
:
try
:
try
:
self
.
rpc
[
'venus/sun/skin_check/pictorial_update_or_create'
](
self
.
rpc
[
'venus/sun/skin_check/pictorial_update_or_create'
](
modify_data
=
modify_data
modify_data
=
modify_data
...
...
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