Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
jd_data_process
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9d194747
authored
Sep 29, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add update
parent
2b1f27ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
update_jd_attr.py
update_jd_attr.py
View file @
9d194747
import
pymysql
from
common
import
request_to_jd_vc
# 主要用于从 lie_shop_class 表中获取到class_id 后,将对应的属性和拓展属性 写入lie_shop_attr表(或者它的copy表)。
def
get_class_ids
():
...
...
@@ -17,14 +17,21 @@ def get_class_ids():
return
data
def
insert_attr
():
db
=
pymysql
.
connect
(
host
=
'192.168.1.238'
,
port
=
3306
,
user
=
'liexin_data_distribution'
,
password
=
'liexin_data_distribution#zsyM'
,
database
=
'liexin_data_distribution'
)
def
update_attr
(
class_id
:
int
):
method_name
=
"jingdong.vc.item.props.find"
token
=
"845ce8478b074103b9e78a769d5fa4831y2u"
app_key
=
"CA52430E90209F51D8F5D7B615DDE9AD"
app_secret
=
"c92691b2379c48de87e699c4c2f7fb32"
data
=
request_to_jd_vc
(
method_name
=
method_name
,
token
=
token
,
app_key
=
app_key
,
app_secret
=
app_secret
,
param
=
{
"category_leaf_id"
:
class_id
}
)
def
get_attr
():
pass
def
get_ext_attr
(
):
def
update_ext_attr
(
class_id
:
int
):
pass
...
...
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