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
1523ed6f
authored
Oct 10, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add update ext attr
parent
b5f14435
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
update_jd_attr.py
update_jd_attr.py
View file @
1523ed6f
...
...
@@ -126,11 +126,24 @@ def update_jd_attr_by_class(conf: dict):
def
update_ext_attr_by_class_ids
():
def
update_ext_attr_by_class_ids
(
conf
:
dict
):
"""
基于lie_shop_attr中的class_id来更新 “拓展” 属性
"""
pass
host
=
conf
[
"host"
]
port
=
conf
[
"port"
]
user
=
conf
[
"user"
]
password
=
conf
[
"password"
]
database
=
conf
[
"database"
]
db
=
pymysql
.
connect
(
host
=
host
,
port
=
port
,
user
=
user
,
password
=
password
,
database
=
database
)
select_sql
=
"select distinct class_id from lie_shop_attr"
cursor
=
db
.
cursor
()
cursor
.
execute
(
query
=
select_sql
)
results
=
cursor
.
fetchall
()
class_ids
=
[]
for
i
in
range
(
len
(
results
)):
class_ids
.
append
(
results
[
i
][
0
])
...
...
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